-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
passing string verbatim to fbuild and other issues #7
Comments
I found a fix for problem B above, but it's a temporary one: edit: This will allow one to have: The obvious option is to add a framework field (on top of lflags), but a more robust solution, as I suggested above, is to add a lflags_verbatim field, which will be a string passed verbatim to the linker (and or cflags_verbatim); this will allow other esoteric compiler/linker options that one cannot think of in advance. |
@thelastmammoth I know this is 3 years late, but: A) That's possible, but you end up with lots of type checks: if isinstance(data, str):
data = data.split() There's also a big can of worms from that (should other iterators be treated as lists or strings? since there are already type checks, should fbuild check the validity of the argument types? what if someone passes in a number?) B) That's definitely a bad issue. An option should probably be added like C) You generally shouldn't use absolute paths in a build system. Regardless, what exactly is your use case? D) That's another issue I need to fix. E) Unfortunately, that's not really possible because fbuild doesn't have the notion of tasks like Waf does. F) I want to add more builders, so that might be coming soon. G) Yes. Also, a |
@thelastmammoth Actually, I think you can build Objective C source with the C builder if you link with c = guess_static(ctx, external_libs=['objc']) |
D now works by placing object files for different targets in different directories. |
A) can we pass a string verbatim as one of the arguments, e.g. lflags, instead of passing in a vector of words?
Incidentally, that would solve the next problem (B).
That would also help migrating between a Makefile (or related) to Fbuild, since typically, arguments are given there as strings. Of course I wrote a 2-liner to go from string to vector of strings, but the problem in A remains.
B) Is there any way to build a C++ program/library that uses OSX frameworks ?
In WAF, you can simply provide:
bld.shlib(source='fun', target='libfun', framework=['A','B'])
There doesn't seem to be an equivalent in Fbuild.
I also tried passing those explicitly to
target = shared.build_lib('libfun', 'fun',lflags=['-framework','A','-framework','B'])
but that doesn't work as Fbuild converts it to :
/usr/bin/g++ -dynamiclib […] -framework A B […]
instead of
/usr/bin/g++ -dynamiclib […] -framework A -framework B […]
which fails (since B is not supposed to be a source)
C) problem when source file is absolute path:
when a source file /path/fun.cpp is absolute, the corresponding object file is in /path/fun.os instead of ./build/path/fun.cpp
D) support for multiple objects per source file
waf smartly compiles fun.cpp in fun.cpp.1.o , fun.cpp.2.o, etc. to support generating multiple object files for one source file.
It seems Fbuild only generates fun.os, which leads to having to recompile certain things and loses the intermediary files.
E) waf has a progress bar (indicating the percent of completion)
I'm not sure whether that'd be possible in Fbuild given the different build model used (and dynamic tasks), but I'm sure there should be some way to have at least an idea.. at the very least writing the task number
F) support for D, objective C, objective C++
Is there a way to at least let the user write his custom build for that?
G) does fbuild -j8have any effect (cf make -j8) ?
I couldn't see it in the (limited) doc
The text was updated successfully, but these errors were encountered: