[Scons-users] Link program without build directory in link path?
edA-qa mort-ora-y
eda-qa at disemia.com
Sun Aug 6 06:33:27 EDT 2017
I've manually concatenated the LIBS and it works. But this feels wrong
somehow, like I'm intentionally avoiding how Scons builds libraries.
My libraries look kind of like this now:
lib_util_name = 'leaf_util'
lib_util = env.SharedLibrary( lib_util_name, [ ... ])
Where I create a name for it since I couldn't find a way to extract this
name from the target.
Then when using the libraries:
leaf = env.Program( 'leaf', [
'bin/leaf.cpp',
'bin/test_expecter.cpp',
],
LIBS = env['LIBS'] + [ lib_lang_name, lib_parser_name,
lib_util_name, lib_ir_name, lib_ir_llvm_name, lib_runner_name ],
)
It works, at least on Linux, but it feels like I'm not using it
correctly. In particular I don't know how this will translate to the OSX
run, or eventual other platforms.
On 06/08/17 12:26, edA-qa mort-ora-y wrote:
> I'm having trouble with this approach since setting LIBS=[...] appears
> to replace the entire libraries list instead of extending it.
>
> Sconstruct:
> https://gist.github.com/mortoray/1bcfb60cfe3c20c2740fd1f8f27442f6
> Sconscript:
> https://gist.github.com/mortoray/f56cdbe1fd2b07c030ee5eb129aeaccf
--
edA-qa mort-ora-y
http://mortoray.com/
Leaf - the language we always wanted
http://leaflang.org/
More information about the Scons-users
mailing list