[clang] [clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (PR #118640)
Haohai Wen via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 4 18:53:21 PST 2024
================
@@ -1055,11 +1055,11 @@ def z : Separate<["-"], "z">, Flags<[LinkerInput]>,
def offload_link : Flag<["--"], "offload-link">, Group<Link_Group>,
HelpText<"Use the new offloading linker to perform the link job.">;
def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
- Visibility<[ClangOption, CLOption, FlangOption, DXCOption]>,
+ Visibility<[ClangOption, FlangOption]>,
----------------
HaohaiWen wrote:
For clang-cl, /link would pass all args after it to linker and that would cause some trouble when using cmake.
e.g. cmake may use clang-cl as "linker" and append some args after flags specified by CMAKE_EXE_LINKER_FLAGS.
In that case, -Xlinker is better choice.
https://github.com/llvm/llvm-project/pull/118640
More information about the cfe-commits
mailing list