|
|
@ -41,35 +41,64 @@ Typical components: |
|
|
|
} |
|
|
|
|
|
|
|
arch=@TERMUX_ARCH@ |
|
|
|
version=@_PKG_MAJOR_VERSION@ |
|
|
|
version=@TERMUX_PKG_VERSION@ |
|
|
|
prefix=@TERMUX_PREFIX@ |
|
|
|
has_rtti=NO |
|
|
|
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="${CFLAGS} -pedantic -Wno-long-long -Wdelete-non-virtual-dtor -Werror=date-time -ffunction-sections" |
|
|
|
CFLAGS="${CFLAGS} -fdata-sections -DNDEBUG" |
|
|
|
CFLAGS="${CPPFLAGS} ${CFLAGS} -fPIC -Werror=date-time -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic \ |
|
|
|
-Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion \ |
|
|
|
-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" |
|
|
|
if [ "$has_rtti" != "YES" ]; then CXXFLAGS="$CXXFLAGS -fno-rtti"; fi |
|
|
|
LDFLAGS="-L${prefix}/lib" |
|
|
|
LIBFILE="${prefix}/lib/libLLVM-$version.so" |
|
|
|
|
|
|
|
show_components () { |
|
|
|
if [ "$arch" == "x86_64" -o "$arch" == "i686" ]; then arch="x86"; fi |
|
|
|
components="all all-targets analysis $arch ${arch}asmparser ${arch}asmprinter ${arch}codegen ${arch}desc" |
|
|
|
components="$components ${arch}disassembler ${arch}info asmparser asmprinter bitreader bitwriter codegen" |
|
|
|
components="$components core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb" |
|
|
|
components="$components demangle engine executionengine globalisel instcombine instrumentation interpreter" |
|
|
|
components="$components ipo irreader libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser" |
|
|
|
components="$components mirparser native nativecodegen objcarcopts object objectyaml option orcjit passes" |
|
|
|
components="$components profiledata runtimedyld scalaropts selectiondag support symbolize tablegen target" |
|
|
|
components="$components transformutils vectorize" |
|
|
|
if [ "$arch" != "arm" ]; then components="$components ${arch}utils"; fi |
|
|
|
echo "$components" |
|
|
|
} |
|
|
|
|
|
|
|
components="aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc \ |
|
|
|
aarch64disassembler aarch64info aarch64utils all all-targets amdgpu amdgpuasmparser amdgpuasmprinter \ |
|
|
|
amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armasmprinter \ |
|
|
|
armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter binaryformat bitreader bitwriter \ |
|
|
|
bpf bpfasmparser bpfasmprinter bpfcodegen bpfdesc bpfdisassembler bpfinfo codegen core coroutines coverage \ |
|
|
|
debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine \ |
|
|
|
fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo \ |
|
|
|
instcombine instrumentation interpreter ipo irreader lanai lanaiasmparser lanaiasmprinter lanaicodegen \ |
|
|
|
lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser \ |
|
|
|
mips mipsasmparser mipsasmprinter mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 \ |
|
|
|
msp430asmprinter msp430codegen msp430desc msp430info native nativecodegen nvptx nvptxasmprinter \ |
|
|
|
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 () { |
|
|
|
case "${1##--}" in |
|
|
|
version) echo "$version";; |
|
|
|
link-shared) libs=$shared_libs ;; |
|
|
|
link-static) libs=$static_libs ;; |
|
|
|
version) echo "$version\n";; |
|
|
|
prefix) echo "$prefix";; |
|
|
|
src-root) echo "@TERMUX_PKG_SRCDIR@";; |
|
|
|
obj-root) echo "$prefix";; |
|
|
@ -81,11 +110,11 @@ handle_args () { |
|
|
|
cxxflags) echo "$CXXFLAGS";; |
|
|
|
ldflags) echo "$LDFLAGS";; |
|
|
|
system-libs) echo "-lc -ldl -lcurses -lz -lm";; |
|
|
|
libs) echo "-l$LIBFILE";; |
|
|
|
libs) echo "$libs";; |
|
|
|
libnames) echo "libLLVM-$version.so";; |
|
|
|
libfiles) echo "$LIBFILE";; |
|
|
|
components) show_components;; |
|
|
|
targets-built) echo "@LLVM_TARGET_ARCH@";; |
|
|
|
components) echo "$components";; |
|
|
|
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@";; |
|
|
|
build-mode) echo "Release";; |
|
|
|
assertion-mode) echo "OFF";; |
|
|
@ -94,9 +123,6 @@ handle_args () { |
|
|
|
has-global-isel) echo "OFF";; |
|
|
|
shared-mode) echo "shared";; |
|
|
|
cmakedir) echo "$prefix/lib/cmake/llvm";; |
|
|
|
# don't know what these do |
|
|
|
link-shared) ;; |
|
|
|
link-static) ;; |
|
|
|
*) show_help >&2;; |
|
|
|
esac |
|
|
|
} |
|
|
|