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

clang-cl expects x64, not x86_64 #71

Closed
wulfgarpro opened this issue Feb 18, 2023 · 2 comments
Closed

clang-cl expects x64, not x86_64 #71

wulfgarpro opened this issue Feb 18, 2023 · 2 comments

Comments

@wulfgarpro
Copy link

wulfgarpro commented Feb 18, 2023

Having run:

xwin splat --output vendor

I want to compile a program with clang-cl on Linux, but lld-link can't find the required libraries on the expected library path:

clang-cl -vctoolsdir vendor/crt/ -winsdkdir vendor/sdk -fuse-ld=lld -v test.c
...
"/usr/bin/lld-link" -out:test.exe -libpath:vendor/crt/lib/x64 -libpath:vendor/crt/atlmfc/lib/x64 -libpath:vendor/sdk/Lib/10.0.20348/ucrt/x64 -libpath:vendor/sdk/Lib/10.0.20348/um/x64 -nologo /tmp/test-eb99a8.obj
lld-link: error: could not open 'libcmt.lib': No such file or directory
lld-link: error: could not open 'oldnames.lib': No such file or directory
lld-link: error: could not open 'uuid.lib': No such file or directory
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)

If I manually symlink the nested x86_64 subdirectories to x64, the above clang-cl command completes successfully.

@Qyriad
Copy link
Contributor

Qyriad commented Feb 19, 2023

You need to use --preserve-ms-arch-notation to use the /vctoolsdir and /winsdkdir options

@wulfgarpro
Copy link
Author

wulfgarpro commented Feb 19, 2023

Thanks; I didn't realise the subcommands had help, i.e. xwin splat --help.

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

2 participants