[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay reopened this revision. MaskRay added a comment. This revision is now accepted and ready to land. I'll go simple - just drop -fno-semantic-interposition from this patch, as I cannot figure out how to make -fno-semantic-interposition specific to llvm/ and clang/. -Bsymbolic-functions

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a subscriber: marco-c. MaskRay added a comment. In D102090#2756605 , @Mordante wrote: > I tried to build the libc++ benchmarks locally and the benchmark with target > `to_chars_libcxx` fails to properly execute. Bi-section let to this

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-13 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added a comment. There is also a test failure on the aarch64 2-stage bot (https://lab.llvm.org/buildbot/#/builders/7/builds/2720) which I've bisected to this change, so I'll revert it for now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-13 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I tried to build the libc++ benchmarks locally and the benchmark with target `to_chars_libcxx` fails to properly execute. Bi-section let to this commit. Can the change in the linker flags affect libc++? I also see the scheduled builds of libc++ fail at Buildkite

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-12 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3bf1acab5b45: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D102090?vs=343758=344866#toc Repository:

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-11 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. I was originally skeptical of this change, because of some negative feedback about these flags in the past on the Fedora development list. However, the people I've talked to more recently seem to be in favor of this change, so no objection from me. Repository: rG

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I'll push this tomorrow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102090/new/ https://reviews.llvm.org/D102090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-11 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added a comment. In D102090#2749473 , @rnk wrote: > +1 to the idea, but I have no idea if this is the right cmake spot > > If we've decided to actually care about the shared library build, should we >

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-10 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. +1 to the idea, but I have no idea if this is the right cmake spot If we've decided to actually care about the shared library build, should we also consider using `-fvisibility-inlines-hidden`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:243 +if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD|Fuchsia|Linux|NetBSD|OpenBSD") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 343758. MaskRay added a comment. Don't affect -DBUILD_SHARED_LIBS=on Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102090/new/ https://reviews.llvm.org/D102090 Files: clang/tools/clang-shlib/CMakeLists.txt

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek requested changes to this revision. phosek added inline comments. This revision now requires changes to proceed. Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:243 +if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD|Fuchsia|Linux|NetBSD|OpenBSD") +

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:243 +if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD|Fuchsia|Linux|NetBSD|OpenBSD") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic-functions") +endif()

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D102090#2745331 , @tstellar wrote: > Does this change mean that LD_PRELOAD will no longer work? Are there any > other downsides to adding these flags? The downside is that it will behave more like Windows dll and Mach-O

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:243 +if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD|Fuchsia|Linux|NetBSD|OpenBSD") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic-functions") +endif()

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 343755. MaskRay added a comment. Set global CMAKE_SHARED_LINKER_FLAGS instead. This additional makes -DBUILD_SHARED_LIBS=on builds (dev only; not recommended for packagers) faster. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. Does this change mean that LD_PRELOAD will no longer work? Are there any other downsides to adding these flags? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102090/new/ https://reviews.llvm.org/D102090

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102090/new/ https://reviews.llvm.org/D102090

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-07 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. Herald added subscribers: pengfei, mgorny. MaskRay requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. In an ELF shared object, a default visibility defined symbol is preemptible by default.