Page MenuHomeFreeBSD

D12701.diff
No OneTemporary

D12701.diff

Index: head/share/mk/bsd.lib.mk
===================================================================
--- head/share/mk/bsd.lib.mk
+++ head/share/mk/bsd.lib.mk
@@ -169,7 +169,9 @@
.if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME)
OBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/}
-CLEANFILES+= ${OBJS} ${STATICOBJS}
+BCOBJS+= ${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.bco/g}
+LLOBJS+= ${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.llo/g}
+CLEANFILES+= ${OBJS} ${BCOBJS} ${LLOBJS} ${STATICOBJS}
.endif
.if defined(LIB) && !empty(LIB)
@@ -200,10 +202,6 @@
.endif
.if defined(LLVM_LINK)
-BCOBJS= ${OBJS:.o=.bco} ${STATICOBJS:.o=.bco}
-LLOBJS= ${OBJS:.o=.llo} ${STATICOBJS:.o=.llo}
-CLEANFILES+= ${BCOBJS} ${LLOBJS}
-
lib${LIB_PRIVATE}${LIB}.bc: ${BCOBJS}
${LLVM_LINK} -o ${.TARGET} ${BCOBJS}
Index: head/share/mk/bsd.prog.mk
===================================================================
--- head/share/mk/bsd.prog.mk
+++ head/share/mk/bsd.prog.mk
@@ -87,6 +87,10 @@
OBJS+= ${SRCS:N*.h:${OBJS_SRCS_FILTER:ts:}:S/$/.o/g}
+# LLVM bitcode / textual IR representations of the program
+BCOBJS+=${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.bco/g}
+LLOBJS+=${SRCS:N*.[hsS]:N*.asm:${OBJS_SRCS_FILTER:ts:}:S/$/.llo/g}
+
.if target(beforelinking)
beforelinking: ${OBJS}
${PROG_FULL}: beforelinking
@@ -117,7 +121,10 @@
# - the name of the object gets put into the executable symbol table instead of
# the name of a variable temporary object.
# - it's useful to keep objects around for crunching.
-OBJS+= ${PROG}.o
+OBJS+= ${PROG}.o
+BCOBJS+= ${PROG}.bc
+LLOBJS+= ${PROG}.ll
+CLEANFILES+= ${PROG}.o ${PROG}.bc ${PROG}.ll
.if target(beforelinking)
beforelinking: ${OBJS}
@@ -148,10 +155,6 @@
.endif
.if defined(LLVM_LINK)
-# LLVM bitcode / textual IR representations of the program
-BCOBJS= ${OBJS:.o=.bco}
-LLOBJS= ${OBJS:.o=.llo}
-
${PROG_FULL}.bc: ${BCOBJS}
${LLVM_LINK} -o ${.TARGET} ${BCOBJS}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 21, 7:54 PM (20 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27817968
Default Alt Text
D12701.diff (1 KB)

Event Timeline