Skip to content

Commit 5a91e35

Browse files
build: remove bogous work-around for problems with sframes
This PR removes a work-around I thought would fix a problem with sframes I ran into on my machine leading to linker errors while compiling ANTLR (a dependency of substrait-cpp). Turns out that the root cause is that CMake uses the system default compiler for dependencies fetched with `FetchContent`, which is g++ on my machine (which emits sframes), which may then linked with compilation units compiled by a different compiler, which may break of LTO is enabled. The short-term solution is to set the `CC? and `CXX` environment variables to the same values as `CMAKE_*_COMPILER` when configuring. I have submitted a better mid-term solution as substrait-io/substrait-cpp#145. Signed-off-by: Ingo Müller <ingomueller@google.com>
1 parent 4f00d6a commit 5a91e35

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

third_party/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ add_compile_options(
1010
$<$<CXX_COMPILER_ID:MSVC>:/FIcstdint>
1111
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-include;cstdint>>")
1212

13-
if(LLVM_ENABLE_LLD AND BUILD_SHARED_LIB)
14-
# If system GAS generates .sframe sections (GAS >= 2.40 on ELF platforms) and
15-
# building with `BUILD_SHARED_LIB`, we get lld linker errors in ANTLR during
16-
# LTO, where static libs are linked into shared libs. Workaround: suppress
17-
# .sframe generation in that situation.
18-
set(ANTLR4_CPP_EXTRA_FLAGS "-Wa,--no-gsframe" CACHE INTERNAL "")
19-
endif()
20-
2113
# The way how Substrait uses sanitizers seems to be incompatible with some flags
2214
# set by LLVM, leading to linker errors, so we deactivate them.
2315
set(SUBSTRAIT_CPP_SANITIZE_DEBUG_BUILD OFF)

0 commit comments

Comments
 (0)