Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add MKLLVMRT to build a subset of the LLVM stack for JIT pur...
details: https://anonhg.NetBSD.org/src/rev/e36c6bc8d0dd
branches: trunk
changeset: 450030:e36c6bc8d0dd
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Apr 03 15:21:58 2019 +0000
description:
Add MKLLVMRT to build a subset of the LLVM stack for JIT purposes.
Hook up AMDGPU backend for clang.
diffstat:
external/bsd/Makefile | 4 +-
external/bsd/llvm/Makefile | 13 +-
external/bsd/llvm/Makefile.inc | 6 +-
external/bsd/llvm/bin/clang/Makefile | 16 +-
external/bsd/llvm/config/llvm/Config/AsmParsers.def | 1 +
external/bsd/llvm/config/llvm/Config/AsmPrinters.def | 1 +
external/bsd/llvm/config/llvm/Config/Disassemblers.def | 1 +
external/bsd/llvm/config/llvm/Config/Targets.def | 1 +
external/bsd/llvm/include/Makefile | 87 +++++-
external/bsd/llvm/lib/Makefile | 16 +-
external/bsd/llvm/librt/Makefile | 127 ++++++++++
external/bsd/llvm/librt/Makefile.inc | 7 +
external/bsd/llvm/librt/libLLVMAArch64AsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAArch64AsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAArch64CodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAArch64Disassembler/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAArch64MCTargetDesc/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAArch64TargetInfo/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAArch64Utils/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAMDGPUAsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAMDGPUAsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAMDGPUCodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAMDGPUMCTargetDesc/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAMDGPUTargetInfo/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAMDGPUUtils/Makefile | 3 +
external/bsd/llvm/librt/libLLVMARMAsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMARMAsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMARMCodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMARMDisassembler/Makefile | 3 +
external/bsd/llvm/librt/libLLVMARMMCTargetDesc/Makefile | 3 +
external/bsd/llvm/librt/libLLVMARMTargetInfo/Makefile | 3 +
external/bsd/llvm/librt/libLLVMARMUtils/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAnalysis/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMAsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMBinaryFormat/Makefile | 3 +
external/bsd/llvm/librt/libLLVMBitReader/Makefile | 3 +
external/bsd/llvm/librt/libLLVMCodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMDebugInfoCodeView/Makefile | 3 +
external/bsd/llvm/librt/libLLVMExecutionEngine/Makefile | 3 +
external/bsd/llvm/librt/libLLVMGlobalISel/Makefile | 3 +
external/bsd/llvm/librt/libLLVMIR/Makefile | 3 +
external/bsd/llvm/librt/libLLVMIRReader/Makefile | 3 +
external/bsd/llvm/librt/libLLVMInstCombine/Makefile | 3 +
external/bsd/llvm/librt/libLLVMInstrumentation/Makefile | 3 +
external/bsd/llvm/librt/libLLVMLinker/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMC/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMCDisassembler/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMCJIT/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMCParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMipsAsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMipsAsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMipsCodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMipsDisassembler/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMipsMCTargetDesc/Makefile | 3 +
external/bsd/llvm/librt/libLLVMMipsTargetInfo/Makefile | 3 +
external/bsd/llvm/librt/libLLVMObject/Makefile | 3 +
external/bsd/llvm/librt/libLLVMPasses/Makefile | 3 +
external/bsd/llvm/librt/libLLVMPowerPCAsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMPowerPCAsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMPowerPCCodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMPowerPCDisassembler/Makefile | 3 +
external/bsd/llvm/librt/libLLVMPowerPCMCTargetDesc/Makefile | 3 +
external/bsd/llvm/librt/libLLVMPowerPCTargetInfo/Makefile | 3 +
external/bsd/llvm/librt/libLLVMProfileData/Makefile | 3 +
external/bsd/llvm/librt/libLLVMRuntimeDyld/Makefile | 3 +
external/bsd/llvm/librt/libLLVMScalarOpts/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSelectionDAG/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSparcAsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSparcAsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSparcCodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSparcDisassembler/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSparcMCTargetDesc/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSparcTargetInfo/Makefile | 3 +
external/bsd/llvm/librt/libLLVMSupport/Makefile | 3 +
external/bsd/llvm/librt/libLLVMTarget/Makefile | 3 +
external/bsd/llvm/librt/libLLVMTransformsAggressiveInstCombine/Makefile | 3 +
external/bsd/llvm/librt/libLLVMTransformsCoroutines/Makefile | 3 +
external/bsd/llvm/librt/libLLVMTransformsUtils/Makefile | 3 +
external/bsd/llvm/librt/libLLVMVectorize/Makefile | 3 +
external/bsd/llvm/librt/libLLVMX86AsmParser/Makefile | 3 +
external/bsd/llvm/librt/libLLVMX86AsmPrinter/Makefile | 3 +
external/bsd/llvm/librt/libLLVMX86CodeGen/Makefile | 3 +
external/bsd/llvm/librt/libLLVMX86Disassembler/Makefile | 3 +
external/bsd/llvm/librt/libLLVMX86MCTargetDesc/Makefile | 3 +
external/bsd/llvm/librt/libLLVMX86TargetInfo/Makefile | 3 +
external/bsd/llvm/librt/libLLVMX86Utils/Makefile | 3 +
external/bsd/llvm/librt/libLLVMipo/Makefile | 3 +
lib/Makefile | 10 +-
tools/Makefile | 10 +-
90 files changed, 499 insertions(+), 29 deletions(-)
diffs (truncated from 1068 to 300 lines):
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/Makefile
--- a/external/bsd/Makefile Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/Makefile Wed Apr 03 15:21:58 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.62 2019/03/25 22:24:54 christos Exp $
+# $NetBSD: Makefile,v 1.63 2019/04/03 15:21:58 joerg Exp $
.include <bsd.own.mk>
@@ -27,7 +27,7 @@
.if (${MKLIBCXX} != "no")
SUBDIR+= libc++
.endif
-.if (${MKLLVM} != "no")
+.if (${MKLLVM} != "no" || ${MKLLVMRT} != "no")
SUBDIR+= llvm
.endif
.if (${MKNSD} != "no")
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/Makefile
--- a/external/bsd/llvm/Makefile Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/Makefile Wed Apr 03 15:21:58 2019 +0000
@@ -1,14 +1,19 @@
-# $NetBSD: Makefile,v 1.11 2019/03/03 17:46:01 maya Exp $
+# $NetBSD: Makefile,v 1.12 2019/04/03 15:21:58 joerg Exp $
.include <bsd.init.mk>
SUBDIR= include \
+
+.if ${MKLLVMRT} != "no"
+SUBDIR+= \
+ librt
+.endif
+
+.if ${MKLLVM} != "no"
+SUBDIR+= \
lib \
.WAIT \
bin
-
-.if ${MKCLANGRT:Uno} == "yes"
-SUBDIR+= librt
.endif
.include "Makefile.inc"
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/Makefile.inc
--- a/external/bsd/llvm/Makefile.inc Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/Makefile.inc Wed Apr 03 15:21:58 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.86 2018/07/17 18:55:24 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.87 2019/04/03 15:21:58 joerg Exp $
.if !defined(LLVM_TOPLEVEL_MK)
LLVM_TOPLEVEL_MK=
@@ -47,11 +47,13 @@
HOST_CPPFLAGS+= ${CPPFLAGS}
HOST_CXXFLAGS+= -O2 -fno-rtti -fno-exceptions
HOST_CPPFLAGS+= -std=c++11
+LLVM_TARGETS= x86,powerpc,sparc,aarch64,arm,mips
.else
LLVM_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config
CLANG_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config
MCLINKER_INCLUDE_CONFIG= ${LLVM_TOPLEVEL}/config/mclinker
LLVM_INCLUDE_OBJDIR!= cd ${LLVM_TOPLEVEL}/include && ${PRINTOBJDIR}
+LLVM_TARGETS= x86,powerpc,sparc,aarch64,arm,mips,amdgpu
.if ${MKLLDB:Uno} == "yes"
CPPFLAGS+= -DLLDB_DISABLE_PYTHON
@@ -69,7 +71,7 @@
LLVM_PLATFORM=${MACHINE_GNU_ARCH}--netbsd
LLVM_CONFIGURE_ARGS= \
- --enable-targets=x86,powerpc,sparc,aarch64,arm,mips \
+ --enable-targets=${LLVM_TARGETS} \
--with-c-include-dirs=/usr/include/clang-${CLANG_VERSION:R}:/usr/include \
--disable-timestamps --prefix=/usr --sysconfdir=/etc/llvm \
--with-clang-default-openmp-runtime=libomp \
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/bin/clang/Makefile
--- a/external/bsd/llvm/bin/clang/Makefile Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/bin/clang/Makefile Wed Apr 03 15:21:58 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2018/07/17 18:55:25 joerg Exp $
+# $NetBSD: Makefile,v 1.38 2019/04/03 15:21:58 joerg Exp $
PROG_CXX= clang
NOMAN= yes
@@ -52,7 +52,19 @@
IRReader \
AsmParser \
BitReader \
- BitWriter \
+ BitWriter
+
+.if !defined(HOSTPROG)
+LLVM_LIBS+= \
+ AMDGPUCodeGen \
+ AMDGPUTargetInfo \
+ AMDGPUAsmParser \
+ AMDGPUMCTargetDesc \
+ AMDGPUAsmPrinter \
+ AMDGPUUtils
+.endif
+
+LLVM_LIBS+= \
AArch64CodeGen \
AArch64TargetInfo \
AArch64AsmParser \
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/config/llvm/Config/AsmParsers.def
--- a/external/bsd/llvm/config/llvm/Config/AsmParsers.def Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/config/llvm/Config/AsmParsers.def Wed Apr 03 15:21:58 2019 +0000
@@ -25,6 +25,7 @@
#endif
LLVM_ASM_PARSER(Mips)
+LLVM_ASM_PARSER(AMDGPU)
LLVM_ASM_PARSER(ARM)
LLVM_ASM_PARSER(AArch64)
LLVM_ASM_PARSER(Sparc)
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/config/llvm/Config/AsmPrinters.def
--- a/external/bsd/llvm/config/llvm/Config/AsmPrinters.def Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/config/llvm/Config/AsmPrinters.def Wed Apr 03 15:21:58 2019 +0000
@@ -25,6 +25,7 @@
#endif
LLVM_ASM_PRINTER(Mips)
+LLVM_ASM_PRINTER(AMDGPU)
LLVM_ASM_PRINTER(ARM)
LLVM_ASM_PRINTER(AArch64)
LLVM_ASM_PRINTER(Sparc)
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/config/llvm/Config/Disassemblers.def
--- a/external/bsd/llvm/config/llvm/Config/Disassemblers.def Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/config/llvm/Config/Disassemblers.def Wed Apr 03 15:21:58 2019 +0000
@@ -25,6 +25,7 @@
#endif
LLVM_DISASSEMBLER(Mips)
+LLVM_DISASSEMBLER(AMDGPU)
LLVM_DISASSEMBLER(ARM)
LLVM_DISASSEMBLER(AArch64)
LLVM_DISASSEMBLER(Sparc)
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/config/llvm/Config/Targets.def
--- a/external/bsd/llvm/config/llvm/Config/Targets.def Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/config/llvm/Config/Targets.def Wed Apr 03 15:21:58 2019 +0000
@@ -24,6 +24,7 @@
#endif
LLVM_TARGET(Mips)
+LLVM_TARGET(AMDGPU)
LLVM_TARGET(ARM)
LLVM_TARGET(AArch64)
LLVM_TARGET(Sparc)
diff -r 8e2d3d18e74d -r e36c6bc8d0dd external/bsd/llvm/include/Makefile
--- a/external/bsd/llvm/include/Makefile Wed Apr 03 15:17:23 2019 +0000
+++ b/external/bsd/llvm/include/Makefile Wed Apr 03 15:21:58 2019 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.48 2019/04/03 15:12:45 joerg Exp $
+# $NetBSD: Makefile,v 1.49 2019/04/03 15:21:58 joerg Exp $
.include <bsd.init.mk>
+.if ${MKLLVM} != "no"
.PATH: ${CLANG_SRCDIR}/lib/Headers
-
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
INCS= adxintrin.h \
ammintrin.h \
@@ -101,12 +101,9 @@
.endif
INCS+= stdatomic.h
INCSDIR= /usr/include/clang-${CLANG_VERSION:R}
+.endif # MKLLVM
.PATH: ${LLVM_SRCDIR}/include/llvm/IR \
- ${CLANG_SRCDIR}/include/clang/AST \
- ${CLANG_SRCDIR}/include/clang/Basic \
- ${CLANG_SRCDIR}/include/clang/Driver \
- ${CLANG_SRCDIR}/include/clang/StaticAnalyzer/Checkers
TABLEGEN_SRC= Attributes.td Intrinsics.td Options.td
@@ -117,6 +114,11 @@
llvm/IR/IntrinsicEnums.inc|-gen-intrinsic-enums \
llvm/IR/IntrinsicImpl.inc|-gen-intrinsic-impl
+.if ${MKLLVM} != "no"
+.PATH: ${CLANG_SRCDIR}/include/clang/AST \
+ ${CLANG_SRCDIR}/include/clang/Basic \
+ ${CLANG_SRCDIR}/include/clang/Driver \
+ ${CLANG_SRCDIR}/include/clang/StaticAnalyzer/Checkers
CLANG_TABLEGEN_SRC= \
arm_fp16.td \
arm_neon.td \
@@ -209,11 +211,22 @@
TABLEGEN_INCLUDES.Options.td= -I${CLANG_SRCDIR}/include/clang/Driver
TABLEGEN_OUTPUT.Options.td= \
clang/Driver/Options.inc|-gen-opt-parser-defs
+.endif # MKLLVM
.include "${.PARSEDIR}/../tablegen.mk"
-DPSRCS+= clang/Basic/Version.inc llvm/Support/VCSRevision.h
-CLEANFILES+= clang/Basic/Version.inc llvm/Support/VCSRevision.h
+DPSRCS+= llvm/Support/VCSRevision.h
+DPSRC+= llvm/Support/VCSRevision.h
+
+llvm/Support/VCSRevision.h: ${LLVM_TOPLEVEL}/Makefile.inc
+ mkdir -p ${.TARGET:H}
+ printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_REVISION "svn-r${LLVM_REVISION}"\n' >> ${.TARGET}.tmp
+ mv ${.TARGET}.tmp ${.TARGET}
+
+.if ${MKLLVM} != "no"
+DPSRCS+= clang/Basic/Version.inc
+CLEANFILES+= clang/Basic/Version.inc
clang/Basic/Version.inc: ${LLVM_TOPLEVEL}/Makefile.inc
mkdir -p ${.TARGET:H}
@@ -223,12 +236,7 @@
printf '#define CLANG_VERSION_MINOR ${CLANG_VERSION:R:E}\n' >> ${.TARGET}.tmp
printf '#define CLANG_VERSION_PATCHLEVEL ${CLANG_VERSION:R:R}\n' >> ${.TARGET}.tmp
mv ${.TARGET}.tmp ${.TARGET}
-
-llvm/Support/VCSRevision.h: ${LLVM_TOPLEVEL}/Makefile.inc
- mkdir -p ${.TARGET:H}
- printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
- printf '#define LLVM_REVISION "svn-r${LLVM_REVISION}"\n' >> ${.TARGET}.tmp
- mv ${.TARGET}.tmp ${.TARGET}
+.endif # MKLLVM
.if ${MKLLD} != "no"
DPSRCS+= lld/Config/Version.inc
@@ -251,6 +259,39 @@
NATIVE_LIBS= -lm -lexecinfo
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+NATIVE_LLVM_ARCH= X86
+.endif
+
+.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "aarch64eb"
+NATIVE_LLVM_ARCH= AArch64
+.endif
+
+.if !empty(MACHINE_ARCH:Mearm*) || !empty(MACHINE_ARCH:Marm*)
+NATIVE_LLVM_ARCH= ARM
+.endif
+
+.if !empty(MACHINE_ARCH:Mmips*)
+NATIVE_LLVM_ARCH= Mips
+.endif
+
+.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
+NATIVE_LLVM_ARCH= PowerPC
+.endif
+
+.if ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
+NATIVE_LLVM_ARCH= Sparc
+.endif
+
+.if defined(NATIVE_LLVM_ARCH)
+NATIVE_LLVM_ASMPARSER= LLVMInitialize${NATIVE_LLVM_ARCH}AsmParser
+NATIVE_LLVM_ASMPRINTER= LLVMInitialize${NATIVE_LLVM_ARCH}AsmPrinter
+NATIVE_LLVM_DISASSEMBLER= LLVMInitialize${NATIVE_LLVM_ARCH}Disassembler
+NATIVE_LLVM_TARGET= LLVMInitialize${NATIVE_LLVM_ARCH}Target
+NATIVE_LLVM_TARGETINFO= LLVMInitialize${NATIVE_LLVM_ARCH}TargetInfo
+NATIVE_LLVM_TARGETMC= LLVMInitialize${NATIVE_LLVM_ARCH}TargetMC
+.endif
+
llvm/Config/config.h: ${LLVM_TOPLEVEL}/Makefile.inc ${LLVM_TOPLEVEL}/config/llvm/Config/config.h.in
mkdir -p ${.TARGET:H}
${TOOL_SED} -e /LLVM_DEFAULT_TARGET_TRIPLE/d -e /LLVM_NATIVE_/d \
@@ -258,6 +299,15 @@
< ${LLVM_TOPLEVEL}/config/llvm/Config/config.h.in \
> ${.TARGET}.tmp
printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
+.if defined(NATIVE_LLVM_ARCH)
+ printf '#define LLVM_NATIVE_ARCH ${NATIVE_LLVM_ARCH}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_ASMPARSER ${NATIVE_LLVM_ASMPARSER}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_ASMPRINTER ${NATIVE_LLVM_ASMPRINTER}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_DISASSEMBLER ${NATIVE_LLVM_DISASSEMBLER}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_TARGET ${NATIVE_LLVM_TARGET}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_TARGETINFO ${NATIVE_LLVM_TARGETINFO}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_TARGETMC ${NATIVE_LLVM_TARGETMC}\n' >> ${.TARGET}.tmp
+.endif
printf '#define PACKAGE_VERSION "${LLVM_VERSION} (trunk ${LLVM_REVISION})"\n' >> ${.TARGET}.tmp
printf '#define LLVM_VERSION_MAJOR ${LLVM_VERSION:R:R}\n' >> ${.TARGET}.tmp
printf '#define LLVM_VERSION_MINOR ${LLVM_VERSION:R:E}\n' >> ${.TARGET}.tmp
@@ -273,6 +323,15 @@
< ${LLVM_TOPLEVEL}/config/llvm/Config/llvm-config.h.in \
> ${.TARGET}.tmp
printf '#define LLVM_DEFAULT_TARGET_TRIPLE "${MACHINE_GNU_PLATFORM}"\n' >> ${.TARGET}.tmp
+.if defined(NATIVE_LLVM_ARCH)
+ printf '#define LLVM_NATIVE_ARCH ${NATIVE_LLVM_ARCH}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_ASMPARSER ${NATIVE_LLVM_ASMPARSER}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_ASMPRINTER ${NATIVE_LLVM_ASMPRINTER}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_DISASSEMBLER ${NATIVE_LLVM_DISASSEMBLER}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_TARGET ${NATIVE_LLVM_TARGET}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_TARGETINFO ${NATIVE_LLVM_TARGETINFO}\n' >> ${.TARGET}.tmp
+ printf '#define LLVM_NATIVE_TARGETMC ${NATIVE_LLVM_TARGETMC}\n' >> ${.TARGET}.tmp
Home |
Main Index |
Thread Index |
Old Index