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 "")
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 "")
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits