[all-commits] [llvm/llvm-project] 3c6f47: [llvm-driver] Fix usage of `InitLLVM` on Windows (...
Alexandre Ganea via All-commits
all-commits at lists.llvm.org
Thu Jan 11 16:08:40 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3c6f47d6b879ddd2842925d2e5da54657d9e5631
https://github.com/llvm/llvm-project/commit/3c6f47d6b879ddd2842925d2e5da54657d9e5631
Author: Alexandre Ganea <37383324+aganea at users.noreply.github.com>
Date: 2024-01-11 (Thu, 11 Jan 2024)
Changed paths:
M clang/tools/clang-scan-deps/ClangScanDeps.cpp
M clang/tools/driver/driver.cpp
M lld/Common/DriverDispatcher.cpp
M lld/tools/lld/lld.cpp
M llvm/cmake/modules/llvm-driver-template.cpp.in
M llvm/lib/Support/InitLLVM.cpp
M llvm/tools/dsymutil/dsymutil.cpp
M llvm/tools/llvm-ar/llvm-ar.cpp
M llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp
M llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
M llvm/tools/llvm-driver/llvm-driver.cpp
M llvm/tools/llvm-dwp/llvm-dwp.cpp
M llvm/tools/llvm-libtool-darwin/llvm-libtool-darwin.cpp
M llvm/tools/llvm-lipo/llvm-lipo.cpp
M llvm/tools/llvm-ml/llvm-ml.cpp
M llvm/tools/llvm-mt/llvm-mt.cpp
M llvm/tools/llvm-nm/llvm-nm.cpp
M llvm/tools/llvm-objcopy/llvm-objcopy.cpp
M llvm/tools/llvm-objdump/llvm-objdump.cpp
M llvm/tools/llvm-profdata/llvm-profdata.cpp
M llvm/tools/llvm-rc/llvm-rc.cpp
M llvm/tools/llvm-readobj/llvm-readobj.cpp
M llvm/tools/llvm-size/llvm-size.cpp
M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
M llvm/tools/sancov/sancov.cpp
Log Message:
-----------
[llvm-driver] Fix usage of `InitLLVM` on Windows (#76306)
Previously, some tools such as `clang` or `lld` which require strict
order for certain command-line options, such as `clang -cc1` or `lld
-flavor`, would not longer work on Windows, when these tools were linked
as part of `llvm-driver`. This was caused by `InitLLVM` which was part
of the `*_main()` function of these tools, which in turn calls
`windows::GetCommandLineArguments`. That function completly replaces
argc/argv by new UTF-8 contents, so any ajustements to argc/argv made by
`llvm-driver` prior to calling these tools was reset.
`InitLLVM` is now called by the `llvm-driver`. Any tool that
participates in (or is part of) the `llvm-driver` doesn't call
`InitLLVM` anymore.
More information about the All-commits
mailing list