mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-01 04:29:57 +00:00
Add an option to the Apple-style build to control whether libLTO.dylib should
be installed. Disable it by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102531 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d100755bab
commit
b8485d69c1
@ -46,6 +46,9 @@ else
|
|||||||
LLVM_OPTIMIZED := yes
|
LLVM_OPTIMIZED := yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Default to not install libLTO.dylib.
|
||||||
|
INSTALL_LIBLTO := no
|
||||||
|
|
||||||
ifndef RC_ProjectSourceVersion
|
ifndef RC_ProjectSourceVersion
|
||||||
RC_ProjectSourceVersion = 9999
|
RC_ProjectSourceVersion = 9999
|
||||||
endif
|
endif
|
||||||
@ -59,7 +62,7 @@ install: $(OBJROOT) $(SYMROOT) $(DSTROOT)
|
|||||||
cd $(OBJROOT) && \
|
cd $(OBJROOT) && \
|
||||||
$(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
|
$(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
|
||||||
$(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
|
$(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
|
||||||
$(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) \
|
$(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \
|
||||||
$(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
|
$(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
|
||||||
|
|
||||||
# installhdrs does nothing, because the headers aren't useful until
|
# installhdrs does nothing, because the headers aren't useful until
|
||||||
|
@ -42,11 +42,15 @@ LLVM_ASSERTIONS="$7"
|
|||||||
# build.
|
# build.
|
||||||
LLVM_OPTIMIZED="$8"
|
LLVM_OPTIMIZED="$8"
|
||||||
|
|
||||||
# The nineth parameter is the version number of the submission, e.g. 1007.
|
# The ninth parameter is a yes/no that indicates whether libLTO.dylib
|
||||||
LLVM_SUBMIT_VERSION="$9"
|
# should be installed.
|
||||||
|
INSTALL_LIBLTO="$9"
|
||||||
|
|
||||||
# The tenth parameter is the subversion number of the submission, e.g. 03.
|
# The tenth parameter is the version number of the submission, e.g. 1007.
|
||||||
LLVM_SUBMIT_SUBVERSION="${10}"
|
LLVM_SUBMIT_VERSION="${10}"
|
||||||
|
|
||||||
|
# The eleventh parameter is the subversion number of the submission, e.g. 03.
|
||||||
|
LLVM_SUBMIT_SUBVERSION="${11}"
|
||||||
|
|
||||||
# The current working directory is where the build will happen. It may already
|
# The current working directory is where the build will happen. It may already
|
||||||
# contain a partial result of an interrupted build, in which case this script
|
# contain a partial result of an interrupted build, in which case this script
|
||||||
@ -276,9 +280,13 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd $DEST_DIR$DEST_ROOT
|
cd $DEST_DIR$DEST_ROOT
|
||||||
mkdir -p $DT_HOME/lib
|
if [ "$INSTALL_LIBLTO" == yes ]; then
|
||||||
mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
|
mkdir -p $DT_HOME/lib
|
||||||
strip -S $DT_HOME/lib/libLTO.dylib
|
mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
|
||||||
|
strip -S $DT_HOME/lib/libLTO.dylib
|
||||||
|
else
|
||||||
|
rm lib/libLTO.dylib
|
||||||
|
fi
|
||||||
rm -f lib/libLTO.a lib/libLTO.la
|
rm -f lib/libLTO.a lib/libLTO.la
|
||||||
|
|
||||||
# The Hello dylib is an example of how to build a pass. No need to install it.
|
# The Hello dylib is an example of how to build a pass. No need to install it.
|
||||||
@ -343,10 +351,11 @@ find $DEST_DIR -name html.tar.gz -exec rm {} \;
|
|||||||
################################################################################
|
################################################################################
|
||||||
# symlinks so that B&I can find things
|
# symlinks so that B&I can find things
|
||||||
|
|
||||||
cd $DEST_DIR
|
if [ "$INSTALL_LIBLTO" == yes ]; then
|
||||||
mkdir -p ./usr/lib/
|
mkdir -p $DEST_DIR/usr/lib/
|
||||||
cd usr/lib
|
cd $DEST_DIR/usr/lib && \
|
||||||
ln -s ../../$DEVELOPER_DIR/usr/lib/libLTO.dylib ./libLTO.dylib
|
ln -s ../../$DEVELOPER_DIR/usr/lib/libLTO.dylib ./libLTO.dylib
|
||||||
|
fi
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# w00t! Done!
|
# w00t! Done!
|
||||||
|
Loading…
Reference in New Issue
Block a user