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

ld: unknown option: --gc-sections #1

Open
nikhiljha opened this issue Aug 5, 2023 · 0 comments
Open

ld: unknown option: --gc-sections #1

nikhiljha opened this issue Aug 5, 2023 · 0 comments

Comments

@nikhiljha
Copy link

When running morphic via PATH="/opt/homebrew/opt/llvm@14/bin:$PATH" LDFLAGS="-L/opt/homebrew/opt/llvm@14/lib" CPPFLAGS="-I/opt/homebrew/opt/llvm@14/include" LLVM_SYS_140_PREFIX=/opt/homebrew/Cellar/llvm@14/14.0.6 cargo run -- run ./samples/concat.mor on MacOS I get...

ld: unknown option: --gc-sections
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
could not spawn child process, IO error: No such file or directory (os error 2)

This seems to be some binary size optimization, so it appears to build and run fine if I comment out the relevant line...

src/llvm_gen.rs
2220:                //.arg("-Wl,--gc-sections")
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

No branches or pull requests

1 participant