================
@@ -220,6 +220,14 @@ if( CLANG_HAVE_DLFCN_H )
cmake_pop_check_state()
endif()
+include(CheckCXXSourceCompiles)
+check_cxx_source_compiles("
+ extern \"C\" void *__emutls_get_address(void *);
+ int main() {
+ return __emutls_get_address((void *)0) != (void *)0;
+ }
+" CLANG_HAVE_EMUTLS_GET_ADDRESS)
----------------
pranavk wrote:
For context, this is trying to fix
https://github.com/llvm/llvm-project/pull/209717 which requires
__emutls_get_address to be available at link time.
This PR is trying to move all that logic into cmake configure time.
There was another version of this PR that didn't have this check and just
required explicitly setting -DCLANG_HAVE_EMUTLS_GET_ADDRESS= but @vgvassilev
wanted to see if we could get that auto set during configure time
https://github.com/llvm/llvm-project/pull/217700
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits