-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang-cl] Always interpret the LIB env var as separated with semicolons
When cross compiling with clang-cl, clang splits the INCLUDE env variable around semicolons (clang/lib/Driver/ToolChains/MSVC.cpp, MSVCToolChain::AddClangSystemIncludeArgs) and lld splits the LIB variable similarly (lld/COFF/Driver.cpp, LinkerDriver::addLibSearchPaths). Therefore, the consensus for cross compilation with clang-cl and lld-link seems to be to use semicolons, despite path lists normally being separated by colons on unix and EnvPathSeparator being set to that. Therefore, handle the LIB variable similarly in Clang, when handling lib file arguments when driving linking via Clang. This fixes commands like "clang-cl test.c -Fetest.exe kernel32.lib" in a cross compilation setting. Normally, most users call (lld-)link directly, but meson happens to use this command syntax for has_function() tests. Differential Revision: https://reviews.llvm.org/D88002
- Loading branch information
Showing
4 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters