Juce_module_info extra linker flags


#1

is it possible to specify “extra linker flags” in a JUCE module? in order to link statically on mac when a dynamic library exists, it seems that you need to put the full path to the archive in the extra link flags section. for example I have to do this for projects that use the juce_faustllvm module, even if they are listed in OSXLibs

/usr/local/lib/libfaust.a /opt/local/lib/libncurses.a /opt/local/lib/libz.a /opt/local/lib/libcrypto.a /opt/local/libexec/llvm-5.0/lib/libLLVMLTO.a /opt/local/libexec/llvm-5.0/lib/libLLVMPasses.a /opt/local/libexec/llvm-5.0/lib/libLLVMObjCARCOpts.a /opt/local/libexec/llvm-5.0/lib/libLLVMSymbolize.a /opt/local/libexec/llvm-5.0/lib/libLLVMDebugInfoPDB.a /opt/local/libexec/llvm-5.0/lib/libLLVMDebugInfoDWARF.a /opt/local/libexec/llvm-5.0/lib/libLLVMMIRParser.a /opt/local/libexec/llvm-5.0/lib/libLLVMCoverage.a /opt/local/libexec/llvm-5.0/lib/libLLVMTableGen.a /opt/local/libexec/llvm-5.0/lib/libLLVMDlltoolDriver.a /opt/local/libexec/llvm-5.0/lib/libLLVMOrcJIT.a /opt/local/libexec/llvm-5.0/lib/libLLVMObjectYAML.a /opt/local/libexec/llvm-5.0/lib/libLLVMLibDriver.a /opt/local/libexec/llvm-5.0/lib/libLLVMOption.a /opt/local/libexec/llvm-5.0/lib/libLLVMX86Disassembler.a /opt/local/libexec/llvm-5.0/lib/libLLVMX86AsmParser.a /opt/local/libexec/llvm-5.0/lib/libLLVMX86CodeGen.a /opt/local/libexec/llvm-5.0/lib/libLLVMGlobalISel.a /opt/local/libexec/llvm-5.0/lib/libLLVMSelectionDAG.a /opt/local/libexec/llvm-5.0/lib/libLLVMAsmPrinter.a /opt/local/libexec/llvm-5.0/lib/libLLVMDebugInfoCodeView.a /opt/local/libexec/llvm-5.0/lib/libLLVMDebugInfoMSF.a /opt/local/libexec/llvm-5.0/lib/libLLVMX86Desc.a /opt/local/libexec/llvm-5.0/lib/libLLVMMCDisassembler.a /opt/local/libexec/llvm-5.0/lib/libLLVMX86Info.a /opt/local/libexec/llvm-5.0/lib/libLLVMX86AsmPrinter.a /opt/local/libexec/llvm-5.0/lib/libLLVMX86Utils.a /opt/local/libexec/llvm-5.0/lib/libLLVMMCJIT.a /opt/local/libexec/llvm-5.0/lib/libLLVMLineEditor.a /opt/local/libexec/llvm-5.0/lib/libLLVMInterpreter.a /opt/local/libexec/llvm-5.0/lib/libLLVMExecutionEngine.a /opt/local/libexec/llvm-5.0/lib/libLLVMRuntimeDyld.a /opt/local/libexec/llvm-5.0/lib/libLLVMCodeGen.a /opt/local/libexec/llvm-5.0/lib/libLLVMTarget.a /opt/local/libexec/llvm-5.0/lib/libLLVMCoroutines.a /opt/local/libexec/llvm-5.0/lib/libLLVMipo.a /opt/local/libexec/llvm-5.0/lib/libLLVMInstrumentation.a /opt/local/libexec/llvm-5.0/lib/libLLVMVectorize.a /opt/local/libexec/llvm-5.0/lib/libLLVMScalarOpts.a /opt/local/libexec/llvm-5.0/lib/libLLVMLinker.a /opt/local/libexec/llvm-5.0/lib/libLLVMIRReader.a /opt/local/libexec/llvm-5.0/lib/libLLVMAsmParser.a /opt/local/libexec/llvm-5.0/lib/libLLVMInstCombine.a /opt/local/libexec/llvm-5.0/lib/libLLVMTransformUtils.a /opt/local/libexec/llvm-5.0/lib/libLLVMBitWriter.a /opt/local/libexec/llvm-5.0/lib/libLLVMAnalysis.a /opt/local/libexec/llvm-5.0/lib/libLLVMProfileData.a /opt/local/libexec/llvm-5.0/lib/libLLVMObject.a /opt/local/libexec/llvm-5.0/lib/libLLVMMCParser.a /opt/local/libexec/llvm-5.0/lib/libLLVMMC.a /opt/local/libexec/llvm-5.0/lib/libLLVMBitReader.a /opt/local/libexec/llvm-5.0/lib/libLLVMCore.a /opt/local/libexec/llvm-5.0/lib/libLLVMBinaryFormat.a /opt/local/libexec/llvm-5.0/lib/libLLVMSupport.a /opt/local/libexec/llvm-5.0/lib/libLLVMDemangle.a

#2

Not currently.

Could you put symlinks to just the static libs into a single, different directory then add that to your path? You could even put symlinks to libraries in juce_faustllvm/libs/MacOSX/x86_64 which automatically gets added to the project’s search paths. I’m not sure if this will survive being stored in git though…