
2014-01-28 Johan Engelen <jbc.engelen@...2592...>:
Random idea: what would be superawesome if we could build a single file, something like:
waf compile --file=johan.cpp --cxxflags="..."
that would only compile (!) johan.cpp with _extra_ cxxflags added. For example to look at assembler/LLVM IR output.
You can say ./waf build --files=src/johan.cpp to compile only that file. (It also works with globs.) The more problematic part is convincing Waf to produce assembly output, because it would require changing the global definition of compilation tasks and disabling the link tasks. However, I think implementing something like this would be possible:
./waf build --assembly-output --files=src/johan.cpp
If you wanted to specify custom flags for some specific files at configure time, that would be easier, but the wscript would have to be written with this functionality in mind. E.g. you would have to define a separate taskgen for each group of files that receives custom flags.
Regards, Krzysztof