[compiler-rt] [CMake] [compiler-rt] fix architecture checks in runtime builds (PR #66374)
Sebastian Poeplau via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 03:27:06 PST 2023
================
@@ -124,15 +125,9 @@ macro(test_target_arch arch def)
SOURCE "#include <limits.h>\nint foo(int x, int y) { return x + y; }\n"
FLAGS ${TARGET_${arch}_CFLAGS})
else()
- set(FLAG_NO_EXCEPTIONS "")
- if(COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG)
- set(FLAG_NO_EXCEPTIONS " -fno-exceptions ")
- endif()
set(SAVED_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${argstring}")
- try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE}
- COMPILE_DEFINITIONS "${TARGET_${arch}_CFLAGS} ${FLAG_NO_EXCEPTIONS}"
----------------
sebastianpoeplau wrote:
I think I tried, mirroring the code in CMake's implementation of `check_cxx_source_compiles`, which passes the flags as compile definitions. There was some sort of problem, but I can't remember now what it was :thinking:
https://github.com/llvm/llvm-project/pull/66374
More information about the llvm-commits
mailing list