tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Trouble with tools build (when installing LLVM headers)



Hi folks,

I'd like to complete installing LLVM headers for the purpose of updating
MesaLib to 18.x and to have it use LLVM.
I'd like to generate and then install include/llvm/IR/*.inc.

Currently, generation is done in external/bsd/llvm/include/Makefile.
For install to happen, generation must happen first.
to preserve order, it needs happen in
external/bsd/llvm/include/llvm/IR/Makefile

This diff does it.

I am not committing it, because I need to make amendments to src/tools,
and I had trouble making them. Can anyone help?

This entails a build of tools with:
MKLLVM=yes
HAVE_LLVM=yes
MKGCC=no

in /etc/mk.conf.

Thanks.
Index: Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/include/Makefile,v
retrieving revision 1.44
diff -u -r1.44 Makefile
--- Makefile	31 Dec 2018 19:33:02 -0000	1.44
+++ Makefile	1 Jan 2019 06:41:13 -0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.44 2018/12/31 19:33:02 maya Exp $
+#	$NetBSD: Makefile,v 1.43 2018/07/17 18:55:27 joerg Exp $
 
 .include <bsd.init.mk>
 
@@ -102,21 +102,11 @@
 INCS+=	stdatomic.h
 INCSDIR=	/usr/include/clang-${CLANG_VERSION:R}
 
-.PATH:	${LLVM_SRCDIR}/include/llvm/IR \
-	${CLANG_SRCDIR}/include/clang/AST \
+.PATH:	${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
-
-TABLEGEN_OUTPUT.Attributes.td= \
-	llvm/IR/Attributes.inc|-gen-attrs
-
-TABLEGEN_OUTPUT.Intrinsics.td= \
-	llvm/IR/IntrinsicEnums.inc|-gen-intrinsic-enums \
-	llvm/IR/IntrinsicImpl.inc|-gen-intrinsic-impl
-
 CLANG_TABLEGEN_SRC=	\
 	arm_fp16.td \
 	arm_neon.td \
@@ -244,9 +234,11 @@
 	mv ${.TARGET}.tmp ${.TARGET}
 .endif
 
+SUBDIR+=	llvm
+
 .ifndef HOST_BUILD
 
-SUBDIR+=	llvm llvm-c
+SUBDIR+=	llvm-c
 
 DPSRCS+=	llvm/Config/config.h llvm/Config/llvm-config.h
 CLEANFILES+=	llvm/Config/config.h llvm/Config/llvm-config.h
Index: llvm/IR/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/llvm/include/llvm/IR/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- llvm/IR/Makefile	31 Dec 2018 19:33:04 -0000	1.1
+++ llvm/IR/Makefile	1 Jan 2019 06:41:13 -0000
@@ -1,12 +1,24 @@
-#	$NetBSD: Makefile,v 1.1 2018/12/31 19:33:04 maya Exp $
+#	$NetBSD: Makefile,v 1.43 2018/07/17 18:55:27 joerg Exp $
 
 .include <bsd.init.mk>
 
 .PATH:	${LLVM_SRCDIR}/include/llvm/IR \
 	${LLVM_SRCDIR}/include/llvm/CodeGen # For RuntimeLibcalls.def
 
+TABLEGEN_SRC=	Attributes.td Intrinsics.td Options.td
+
+TABLEGEN_OUTPUT.Attributes.td= \
+	llvm/IR/Attributes.inc|-gen-attrs
+
+TABLEGEN_OUTPUT.Intrinsics.td= \
+	llvm/IR/IntrinsicEnums.inc|-gen-intrinsic-enums \
+	llvm/IR/IntrinsicImpl.inc|-gen-intrinsic-impl
+
+.include "${LLVM_TOPLEVEL}/tablegen.mk"
+
 INCS=	Argument.h \
 	AssemblyAnnotationWriter.h \
+	Attributes.inc \
 	Attributes.h \
 	AutoUpgrade.h \
 	BasicBlock.h \
@@ -51,6 +63,8 @@
 	Instruction.h \
 	Instructions.h \
 	IntrinsicInst.h \
+	IntrinsicEnums.inc \
+	IntrinsicImpl.inc \
 	Intrinsics.h \
 	LLVMContext.h \
 	LegacyPassManager.h \
@@ -91,11 +105,6 @@
 	ValueSymbolTable.h \
 	Verifier.h
 
-#	Not yet, need tablegen at tool time
-#	Attributes.inc
-#	IntrinsicEnums.inc
-#	IntrinsicImpl.inc
-
 INCSDIR=	/usr/include/llvm/IR
 
 .include <bsd.prog.mk>


Home | Main Index | Thread Index | Old Index