Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make zig build work with latest master #587

Merged
merged 1 commit into from
Aug 21, 2022

Conversation

leecannon
Copy link
Member

set use_stage1 in build.zig

@nektro
Copy link
Contributor

nektro commented Aug 20, 2022

unsetting this flag is currently blocked on ziglang/zig#12486

@SuperAuguste SuperAuguste merged commit 4a860bf into zigtools:master Aug 21, 2022
@dyxushuai
Copy link

But, it has led to the latest release version of zig to not work as expected.

@leecannon
Copy link
Member Author

@dyxushuai if by latest release you mean 0.9.1 then this is not the only thing preventing zls building with it, as zls master tracks zig master and there have been many changes to the stdlib in the 3000+ commits to zig since 0.9.1

@dyxushuai
Copy link

I got it. Zls doesn't support arm mac now and I needs use it with building zig and zls both from source. 😂

@squarism
Copy link

squarism commented Sep 4, 2022

@dyxushuai Build zls with zig master.

  1. Clone zls as in the wiki
  2. Install master zig (example here with asdf)
# install asdf - not shown, instructions on website

# add zig and install master
asdf plugin add zig
asdf install zig master

# cd to zls source and set this repo to build with master
# you'll have a new .tool-versions file (which might be helpful in the future for remembering/updating)
asdf local zig master

# build on m1
zig build -Drelease-safe

# no more error
# error: no member named 'use_stage1' in struct 'std.build.LibExeObjStep'

# put zls in PATH, I use ~/bin
cp zig-out/bin/zls ~/bin

# fire up vim, enjoy inline errors etc
# autocomplete probably needs more setup than this, not sure

@dyxushuai
Copy link

@squarism With a simple solution, I use homebrew and could install master just with brew install --HEAD zig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants