From 7273339dc40e5e9e1f0c1fb3c72a29c8528f256d Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 10 May 2014 16:38:03 +0000 Subject: [PATCH] Eliminate EARLY_BUILD flag. It is redundant and means MK_CLANG_FULL=no and MK_LLDB=no, so set those explicitly (now that we can do that). Simplify tests for these variables as well, since we know they will always be defined regardless of the phase of the build. --- Makefile.inc1 | 9 +++++---- lib/clang/Makefile | 11 ++++------- lib/clang/clang.build.mk | 4 ++-- share/mk/bsd.prog.mk | 2 +- share/mk/bsd.sys.mk | 4 ---- usr.bin/clang/clang/Makefile | 4 ++-- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 0781a1c88664..f3fda5769957 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -248,7 +248,8 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ SSP_CFLAGS= \ MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ - -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no -DEARLY_BUILD MK_TESTS=no + -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ + MK_CLANG_FULL=no MK_LLDB=no MK_TESTS=no # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ @@ -258,7 +259,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ BOOTSTRAPPING=${OSRELDATE} \ SSP_CFLAGS= \ -DNO_LINT \ - -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no -DEARLY_BUILD MK_TESTS=no + -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no MK_CLANG_FULL=no MK_LLDB=no MK_TESTS=no # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ @@ -277,7 +278,7 @@ KTMAKE= TOOLS_PREFIX=${WORLDTMP} MAKEOBJDIRPREFIX=${WORLDTMP} \ SSP_CFLAGS= \ MK_HTML=no MK_INFO=no -DNO_LINT MK_MAN=no \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ - -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no -DEARLY_BUILD + -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no # world stage WMAKEENV= ${CROSSENV} \ @@ -610,7 +611,7 @@ build32: MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ - -DEARLY_BUILD build-tools + build-tools .endfor cd ${.CURDIR}; \ ${LIB32WMAKE} -f Makefile.inc1 libraries diff --git a/lib/clang/Makefile b/lib/clang/Makefile index ae7ae4a0a44d..328aa7871a92 100644 --- a/lib/clang/Makefile +++ b/lib/clang/Makefile @@ -3,8 +3,7 @@ .include .if !make(install) -.if !defined(EARLY_BUILD) -.if defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no" +.if ${MK_CLANG_FULL} != "no" _libclangstaticanalyzer= \ libclangstaticanalyzercheckers \ libclangstaticanalyzercore \ @@ -12,13 +11,11 @@ _libclangstaticanalyzer= \ _libclangarcmigrate= \ libclangarcmigrate .endif # MK_CLANG_FULL -.if (defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no") || \ - (defined(MK_LLDB) && ${MK_LLDB} != "no") +.if ${MK_CLANG_FULL} != "no" || ${MK_LLDB} != "no" _libclangrewriter= \ libclangrewritecore \ libclangrewritefrontend .endif # (MK_CLANG_FULL || MK_LLDB) -.endif # !EARLY_BUILD SUBDIR= libclanganalysis \ ${_libclangarcmigrate} \ @@ -105,7 +102,7 @@ SUBDIR+=libllvmexecutionengine \ libllvmruntimedyld .endif # MK_CLANG_EXTRAS | LLDB -.if !defined(EARLY_BUILD) && ${MK_LLDB} != "no" +.if ${MK_LLDB} != "no" SUBDIR+=liblldb \ \ liblldbAPI \ @@ -141,7 +138,7 @@ SUBDIR+=liblldb \ liblldbPluginSymbolVendorELF \ liblldbPluginUnwindAssemblyInstEmulation \ liblldbPluginUnwindAssemblyX86 -.endif # !EARLY_BUILD && MK_LLDB +.endif # MK_LLDB .endif # !make(install) diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 057b8aa613b5..3f75a6d99f65 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -10,11 +10,11 @@ CFLAGS+= -I${LLVM_SRCS}/include -I${CLANG_SRCS}/include \ -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD \ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG -.if !defined(EARLY_BUILD) && defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no" +.if ${MK_CLANG_FULL} != "no" CFLAGS+= -DCLANG_ENABLE_ARCMT \ -DCLANG_ENABLE_REWRITER \ -DCLANG_ENABLE_STATIC_ANALYZER -.endif # !EARLY_BUILD && MK_CLANG_FULL +.endif # MK_CLANG_FULL # LLVM is not strict aliasing safe as of 12/31/2011 CFLAGS+= -fno-strict-aliasing diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 06867eb0e812..a221b53953f1 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -173,7 +173,7 @@ _EXTRADEPEND: .endif .else echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} -.if defined(PROG_CXX) && !defined(EARLY_BUILD) +.if defined(PROG_CXX) .if ${COMPILER_TYPE} == "clang" && empty(CXXFLAGS:M-stdlib=libstdc++) echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} .else diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 3bcd237a9399..41d74461b9ca 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -139,12 +139,8 @@ CFLAGS+= ${SSP_CFLAGS} CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}} .endif -# Not sure this is 100% kosher, but I think that EARLY_BUILD must be only -# defined when we're not building programs that use the CFLAGS.foo feature. -.if !defined(EARLY_BUILD) CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} -.endif # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. diff --git a/usr.bin/clang/clang/Makefile b/usr.bin/clang/clang/Makefile index 74ef867b441c..345efde9076e 100644 --- a/usr.bin/clang/clang/Makefile +++ b/usr.bin/clang/clang/Makefile @@ -36,7 +36,7 @@ TGHDRS= CC1AsOptions \ DiagnosticSemaKinds \ Options -.if !defined(EARLY_BUILD) && defined(MK_CLANG_FULL) && ${MK_CLANG_FULL} != "no" +.if ${MK_CLANG_FULL} != "no" _clangstaticanalyzer= \ clangstaticanalyzerfrontend \ clangstaticanalyzercheckers \ @@ -46,7 +46,7 @@ _clangarcmigrate= \ _clangrewriter= \ clangrewritefrontend \ clangrewritecore -.endif # !EARLY_BUILD && MK_CLANG_FULL +.endif # MK_CLANG_FULL LIBDEPS=clangfrontendtool \ clangfrontend \