[PATCH] D78687: [Fuchsia] Build compiler-rt builtins for 32-bit x86
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 22 16:52:58 PDT 2020
phosek created this revision.
phosek added a reviewer: mcgrathr.
Herald added subscribers: cfe-commits, s.egerton, simoncook, mgorny, dberris.
Herald added a project: clang.
While we don't support 32-bit architectures in Fuchsia, these are needed
in the early boot phase on x86, so we build just these to satisfy that
use case.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78687
Files:
clang/cmake/caches/Fuchsia-stage2.cmake
clang/lib/Basic/Targets.cpp
Index: clang/lib/Basic/Targets.cpp
===================================================================
--- clang/lib/Basic/Targets.cpp
+++ clang/lib/Basic/Targets.cpp
@@ -480,6 +480,8 @@
return new OpenBSDI386TargetInfo(Triple, Opts);
case llvm::Triple::FreeBSD:
return new FreeBSDTargetInfo<X86_32TargetInfo>(Triple, Opts);
+ case llvm::Triple::Fuchsia:
+ return new FuchsiaTargetInfo<X86_32TargetInfo>(Triple, Opts);
case llvm::Triple::KFreeBSD:
return new KFreeBSDTargetInfo<X86_32TargetInfo>(Triple, Opts);
case llvm::Triple::Minix:
Index: clang/cmake/caches/Fuchsia-stage2.cmake
===================================================================
--- clang/cmake/caches/Fuchsia-stage2.cmake
+++ clang/cmake/caches/Fuchsia-stage2.cmake
@@ -105,15 +105,16 @@
if(FUCHSIA_SDK)
set(FUCHSIA_aarch64_NAME arm64)
+ set(FUCHSIA_i386_NAME x64)
set(FUCHSIA_x86_64_NAME x64)
set(FUCHSIA_riscv64_NAME riscv64)
- foreach(target x86_64;aarch64;riscv64)
+ foreach(target i386;x86_64;aarch64;riscv64)
set(FUCHSIA_${target}_COMPILER_FLAGS "-I${FUCHSIA_SDK}/pkg/fdio/include")
set(FUCHSIA_${target}_LINKER_FLAGS "-L${FUCHSIA_SDK}/arch/${FUCHSIA_${target}_NAME}/lib")
set(FUCHSIA_${target}_SYSROOT "${FUCHSIA_SDK}/arch/${FUCHSIA_${target}_NAME}/sysroot")
endforeach()
- foreach(target x86_64;aarch64;riscv64)
+ foreach(target i386;x86_64;aarch64;riscv64)
# Set the per-target builtins options.
list(APPEND BUILTIN_TARGETS "${target}-unknown-fuchsia")
set(BUILTINS_${target}-unknown-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78687.259426.patch
Type: text/x-patch
Size: 1614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200422/323f129a/attachment-0001.bin>
More information about the cfe-commits
mailing list