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.
This commit is contained in:
Warner Losh 2014-05-10 16:38:03 +00:00
parent ab72ce6b1b
commit 7273339dc4
6 changed files with 14 additions and 20 deletions

View File

@ -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

View File

@ -3,8 +3,7 @@
.include <src.opts.mk>
.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)

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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 \