[all-commits] [llvm/llvm-project] 0c7669: [clang][driver] Pass `-femulated-tls` through to t...
Paul Kirth via All-commits
all-commits at lists.llvm.org
Tue May 2 10:49:17 PDT 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: 0c7669bc2bbf0fe7be0b6855bd2d98cad853c4ef
https://github.com/llvm/llvm-project/commit/0c7669bc2bbf0fe7be0b6855bd2d98cad853c4ef
Author: Paul Kirth <paulkirth at google.com>
Date: 2023-05-02 (Tue, 02 May 2023)
Changed paths:
M clang/lib/Driver/ToolChains/CommonArgs.cpp
M clang/test/Driver/emulated-tls.cpp
Log Message:
-----------
[clang][driver] Pass `-femulated-tls` through to the linker in LTO mode
Currently the driver does not propagate the `-f[no-]emulated-tls` flags
to the linker under LTO. This can be surprising when the platform
defaults differ from the flags being passed. A related discussion can be
found in https://reviews.llvm.org/D143619. While the focus there was
RISC-V support, the root cause was that setting `-femualted-tls` and
`-flto` when compiling with Clang resulted in missing symbols because
the platform defaults for Android differed from the flags being passed
to Clang.
This patch changes the Clang driver's behavior to pass the emulated-tls
flags through to the linker when compiling with LTO/ThinLTO.
Reviewed By: phosek, vit9696
Differential Revision: https://reviews.llvm.org/D147834
(cherry picked from commit a78816a6b6debb548efbf1717aeeb490df42f401)
More information about the All-commits
mailing list