forked from OSchip/llvm-project
[WebAssembly] Enable the builtins library for WebAssembly.
llvm-svn: 257619
This commit is contained in:
parent
01731fc150
commit
746cd84e3c
|
@ -150,6 +150,8 @@ macro(detect_target_arch)
|
|||
check_symbol_exists(__i386__ "" __I386)
|
||||
check_symbol_exists(__mips__ "" __MIPS)
|
||||
check_symbol_exists(__mips64__ "" __MIPS64)
|
||||
check_symbol_exists(__wasm32__ "" __WEBASSEMBLY32)
|
||||
check_symbol_exists(__wasm64__ "" __WEBASSEMBLY64)
|
||||
if(__ARM)
|
||||
add_default_target_arch(arm)
|
||||
elseif(__AARCH64)
|
||||
|
@ -164,6 +166,10 @@ macro(detect_target_arch)
|
|||
add_default_target_arch(mips64)
|
||||
elseif(__MIPS)
|
||||
add_default_target_arch(mips)
|
||||
elseif(__WEBASSEMBLY32)
|
||||
add_default_target_arch(wasm32)
|
||||
elseif(__WEBASSEMBLY64)
|
||||
add_default_target_arch(wasm64)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
@ -220,6 +226,10 @@ elseif(NOT APPLE) # Supported archs for Apple platforms are generated later
|
|||
test_target_arch(aarch32 "" "-march=armv8-a")
|
||||
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "aarch64")
|
||||
test_target_arch(aarch64 "" "-march=armv8-a")
|
||||
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm32")
|
||||
test_target_arch(wasm32 "" "--target=wasm32-unknown-unknown")
|
||||
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "wasm64")
|
||||
test_target_arch(wasm64 "" "--target=wasm64-unknown-unknown")
|
||||
endif()
|
||||
set(COMPILER_RT_OS_SUFFIX "")
|
||||
endif()
|
||||
|
@ -260,6 +270,8 @@ set(X86_64 x86_64)
|
|||
set(MIPS32 mips mipsel)
|
||||
set(MIPS64 mips64 mips64el)
|
||||
set(PPC64 powerpc64 powerpc64le)
|
||||
set(WASM32 wasm32)
|
||||
set(WASM64 wasm64)
|
||||
|
||||
if(APPLE)
|
||||
set(ARM64 arm64)
|
||||
|
@ -268,7 +280,7 @@ if(APPLE)
|
|||
endif()
|
||||
|
||||
set(ALL_BUILTIN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
|
||||
${MIPS32} ${MIPS64})
|
||||
${MIPS32} ${MIPS64} ${WASM32} ${WASM64})
|
||||
set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64}
|
||||
${ARM32} ${ARM64} ${MIPS32} ${MIPS64})
|
||||
set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
|
||||
|
|
|
@ -353,6 +353,9 @@ set(mipsel_SOURCES ${mips_SOURCES})
|
|||
set(mips64_SOURCES ${mips_SOURCES})
|
||||
set(mips64el_SOURCES ${mips_SOURCES})
|
||||
|
||||
set(wasm32_SOURCES ${GENERIC_SOURCES})
|
||||
set(wasm64_SOURCES ${GENERIC_SOURCES})
|
||||
|
||||
add_custom_target(builtins)
|
||||
|
||||
if (APPLE)
|
||||
|
|
Loading…
Reference in New Issue