|
@ -41,35 +41,64 @@ Typical components: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
arch=@TERMUX_ARCH@ |
|
|
arch=@TERMUX_ARCH@ |
|
|
version=@_PKG_MAJOR_VERSION@ |
|
|
version=@TERMUX_PKG_VERSION@ |
|
|
prefix=@TERMUX_PREFIX@ |
|
|
prefix=@TERMUX_PREFIX@ |
|
|
has_rtti=NO |
|
|
has_rtti=NO |
|
|
CPPFLAGS="-I${prefix}/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" |
|
|
CPPFLAGS="-I${prefix}/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS" |
|
|
CFLAGS="${CPPFLAGS} -Os -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers" |
|
|
CFLAGS="${CPPFLAGS} ${CFLAGS} -fPIC -Werror=date-time -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic \ |
|
|
CFLAGS="${CFLAGS} -pedantic -Wno-long-long -Wdelete-non-virtual-dtor -Werror=date-time -ffunction-sections" |
|
|
-Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion \ |
|
|
CFLAGS="${CFLAGS} -fdata-sections -DNDEBUG" |
|
|
-ffunction-sections -fdata-sections -Os -DNDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS \ |
|
|
|
|
|
-D__STDC_LIMIT_MACROS" |
|
|
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -Wcast-qual -Wnon-virtual-dtor -std=c++11 -fno-exceptions" |
|
|
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden -Wcast-qual -Wnon-virtual-dtor -std=c++11 -fno-exceptions" |
|
|
if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi |
|
|
if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi |
|
|
LDFLAGS="-L${prefix}/lib" |
|
|
LDFLAGS="-L${prefix}/lib" |
|
|
LIBFILE="${prefix}/lib/libLLVM-$version.so" |
|
|
LIBFILE="${prefix}/lib/libLLVM-$version.so" |
|
|
|
|
|
|
|
|
show_components () { |
|
|
components="aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc \ |
|
|
if [ "$arch" == "x86_64" -o "$arch" == "i686" ]; then arch="x86"; fi |
|
|
aarch64disassembler aarch64info aarch64utils all all-targets amdgpu amdgpuasmparser amdgpuasmprinter \ |
|
|
components="all all-targets analysis $arch ${arch}asmparser ${arch}asmprinter ${arch}codegen ${arch}desc" |
|
|
amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armasmprinter \ |
|
|
components="$components ${arch}disassembler ${arch}info asmparser asmprinter bitreader bitwriter codegen" |
|
|
armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter binaryformat bitreader bitwriter \ |
|
|
components="$components core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb" |
|
|
bpf bpfasmparser bpfasmprinter bpfcodegen bpfdesc bpfdisassembler bpfinfo codegen core coroutines coverage \ |
|
|
components="$components demangle engine executionengine globalisel instcombine instrumentation interpreter" |
|
|
debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine \ |
|
|
components="$components ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser" |
|
|
fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo \ |
|
|
components="$components mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes" |
|
|
instcombine instrumentation interpreter ipo irreader lanai lanaiasmparser lanaiasmprinter lanaicodegen \ |
|
|
components="$components profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target" |
|
|
lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser \ |
|
|
components="$components transformutils vectorize" |
|
|
mips mipsasmparser mipsasmprinter mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 \ |
|
|
if [ "$arch" != "arm" ]; then components="$components ${arch}utils"; fi |
|
|
msp430asmprinter msp430codegen msp430desc msp430info native nativecodegen nvptx nvptxasmprinter \ |
|
|
echo "$components" |
|
|
nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit passes powerpc powerpcasmparser \ |
|
|
} |
|
|
powerpcasmprinter powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata runtimedyld scalaropts \ |
|
|
|
|
|
selectiondag sparc sparcasmparser sparcasmprinter sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize \ |
|
|
|
|
|
systemz systemzasmparser systemzasmprinter systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target \ |
|
|
|
|
|
transformutils vectorize webassembly webassemblyasmprinter webassemblycodegen webassemblydesc webassemblydisassembler \ |
|
|
|
|
|
webassemblyinfo windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils xcore \ |
|
|
|
|
|
xcoreasmprinter xcorecodegen xcoredesc xcoredisassembler xcoreinfo" |
|
|
|
|
|
static_libs="-lLLVMLTO -lLLVMPasses -lLLVMObjCARCOpts -lLLVMMIRParser -lLLVMSymbolize -lLLVMDebugInfoPDB -lLLVMDebugInfoDWARF \ |
|
|
|
|
|
-lLLVMCoverage -lLLVMTableGen -lLLVMDlltoolDriver -lLLVMOrcJIT -lLLVMWebAssemblyDisassembler -lLLVMWebAssemblyCodeGen \ |
|
|
|
|
|
-lLLVMWebAssemblyDesc -lLLVMWebAssemblyInfo -lLLVMWebAssemblyAsmPrinter -lLLVMXCoreDisassembler -lLLVMXCoreCodeGen \ |
|
|
|
|
|
-lLLVMXCoreDesc -lLLVMXCoreInfo -lLLVMXCoreAsmPrinter -lLLVMSystemZDisassembler -lLLVMSystemZCodeGen -lLLVMSystemZAsmParser \ |
|
|
|
|
|
-lLLVMSystemZDesc -lLLVMSystemZInfo -lLLVMSystemZAsmPrinter -lLLVMSparcDisassembler -lLLVMSparcCodeGen -lLLVMSparcAsmParser \ |
|
|
|
|
|
-lLLVMSparcDesc -lLLVMSparcInfo -lLLVMSparcAsmPrinter -lLLVMPowerPCDisassembler -lLLVMPowerPCCodeGen -lLLVMPowerPCAsmParser \ |
|
|
|
|
|
-lLLVMPowerPCDesc -lLLVMPowerPCInfo -lLLVMPowerPCAsmPrinter -lLLVMNVPTXCodeGen -lLLVMNVPTXDesc -lLLVMNVPTXInfo -lLLVMNVPTXAsmPrinter \ |
|
|
|
|
|
-lLLVMMSP430CodeGen -lLLVMMSP430Desc -lLLVMMSP430Info -lLLVMMSP430AsmPrinter -lLLVMMipsDisassembler -lLLVMMipsCodeGen -lLLVMMipsAsmParser \ |
|
|
|
|
|
-lLLVMMipsDesc -lLLVMMipsInfo -lLLVMMipsAsmPrinter -lLLVMLanaiDisassembler -lLLVMLanaiCodeGen -lLLVMLanaiAsmParser -lLLVMLanaiDesc \ |
|
|
|
|
|
-lLLVMLanaiAsmPrinter -lLLVMLanaiInfo -lLLVMHexagonDisassembler -lLLVMHexagonCodeGen -lLLVMHexagonAsmParser -lLLVMHexagonDesc -lLLVMHexagonInfo \ |
|
|
|
|
|
-lLLVMBPFDisassembler -lLLVMBPFCodeGen -lLLVMBPFAsmParser -lLLVMBPFDesc -lLLVMBPFInfo -lLLVMBPFAsmPrinter -lLLVMARMDisassembler \ |
|
|
|
|
|
-lLLVMARMCodeGen -lLLVMARMAsmParser -lLLVMARMDesc -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMARMUtils -lLLVMAMDGPUDisassembler \ |
|
|
|
|
|
-lLLVMAMDGPUCodeGen -lLLVMAMDGPUAsmParser -lLLVMAMDGPUDesc -lLLVMAMDGPUInfo -lLLVMAMDGPUAsmPrinter -lLLVMAMDGPUUtils \ |
|
|
|
|
|
-lLLVMAArch64Disassembler -lLLVMAArch64CodeGen -lLLVMAArch64AsmParser -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter \ |
|
|
|
|
|
-lLLVMAArch64Utils -lLLVMObjectYAML -lLLVMLibDriver -lLLVMOption -lLLVMWindowsManifest -lLLVMFuzzMutate -lLLVMX86Disassembler \ |
|
|
|
|
|
-lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF \ |
|
|
|
|
|
-lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMMCJIT -lLLVMLineEditor -lLLVMInterpreter \ |
|
|
|
|
|
-lLLVMExecutionEngine -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMTarget -lLLVMCoroutines -lLLVMipo -lLLVMInstrumentation -lLLVMVectorize \ |
|
|
|
|
|
-lLLVMScalarOpts -lLLVMLinker -lLLVMIRReader -lLLVMAsmParser -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis \ |
|
|
|
|
|
-lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle" |
|
|
|
|
|
shared_libs="-lLLVM-$version" |
|
|
|
|
|
libs=$shared_libs |
|
|
handle_args () { |
|
|
handle_args () { |
|
|
case "${1##--}" in |
|
|
case "${1##--}" in |
|
|
version) echo "$version";; |
|
|
link-shared) libs=$shared_libs ;; |
|
|
|
|
|
link-static) libs=$static_libs ;; |
|
|
|
|
|
version) echo "$version\n";; |
|
|
prefix) echo "$prefix";; |
|
|
prefix) echo "$prefix";; |
|
|
src-root) echo "@TERMUX_PKG_SRCDIR@";; |
|
|
src-root) echo "@TERMUX_PKG_SRCDIR@";; |
|
|
obj-root) echo "$prefix";; |
|
|
obj-root) echo "$prefix";; |
|
@ -81,11 +110,11 @@ handle_args () { |
|
|
cxxflags) echo "$CXXFLAGS";; |
|
|
cxxflags) echo "$CXXFLAGS";; |
|
|
ldflags) echo "$LDFLAGS";; |
|
|
ldflags) echo "$LDFLAGS";; |
|
|
system-libs) echo "-lc -ldl -lcurses -lz -lm";; |
|
|
system-libs) echo "-lc -ldl -lcurses -lz -lm";; |
|
|
libs) echo "-l$LIBFILE";; |
|
|
libs) echo "$libs";; |
|
|
libnames) echo "libLLVM-$version.so";; |
|
|
libnames) echo "libLLVM-$version.so";; |
|
|
libfiles) echo "$LIBFILE";; |
|
|
libfiles) echo "$LIBFILE";; |
|
|
components) show_components;; |
|
|
components) echo "$components";; |
|
|
targets-built) echo "@LLVM_TARGET_ARCH@";; |
|
|
targets-built) echo "AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 NVPTX PowerPC Sparc SystemZ X86 XCore WebAssembly";; |
|
|
host-target) echo "@LLVM_DEFAULT_TARGET_TRIPLE@";; |
|
|
host-target) echo "@LLVM_DEFAULT_TARGET_TRIPLE@";; |
|
|
build-mode) echo "Release";; |
|
|
build-mode) echo "Release";; |
|
|
assertion-mode) echo "OFF";; |
|
|
assertion-mode) echo "OFF";; |
|
@ -94,9 +123,6 @@ handle_args () { |
|
|
has-global-isel) echo "OFF";; |
|
|
has-global-isel) echo "OFF";; |
|
|
shared-mode) echo "shared";; |
|
|
shared-mode) echo "shared";; |
|
|
cmakedir) echo "$prefix/lib/cmake/llvm";; |
|
|
cmakedir) echo "$prefix/lib/cmake/llvm";; |
|
|
# don't know what these do |
|
|
|
|
|
link-shared) ;; |
|
|
|
|
|
link-static) ;; |
|
|
|
|
|
*) show_help >&2;; |
|
|
*) show_help >&2;; |
|
|
esac |
|
|
esac |
|
|
} |
|
|
} |
|
|