[llvm] Fix warnings while building llvm against emscripten for web assembly (PR #118262)
Anutosh Bhat via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 18:32:31 PST 2024
================
@@ -636,10 +636,18 @@ function(llvm_add_library name)
endif()
if(ARG_MODULE)
- add_library(${name} MODULE ${ALL_FILES})
+ if(EMSCRIPTEN)
+ add_library(${name} STATIC ${ALL_FILES})
+ else()
+ add_library(${name} MODULE ${ALL_FILES})
+ endif()
elseif(ARG_SHARED)
add_windows_version_resource_file(ALL_FILES ${ALL_FILES})
- add_library(${name} SHARED ${ALL_FILES})
+ if(EMSCRIPTEN)
+ add_library(${name} STATIC ${ALL_FILES})
+ else()
+ add_library(${name} SHARED ${ALL_FILES})
+ endif()
----------------
anutosh491 wrote:
Yes I think that would do to !
https://github.com/llvm/llvm-project/pull/118262
More information about the llvm-commits
mailing list