Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore build errors and build as far as possible with scons -i or with scons -k or both?

Tags:

scons

I am extending a command for scons, but have incomplete sources. A few xml pdf documents do not exist. according to scons wiki, I could use scons -i (--ignore-errors, Ignore all errors from commands executed to rebuild files.) or scons -k (--keep-going, Continue as much as possible after an error. The target that failed and those that depend on it will not be remade, but other targets specified on the command line will still be processed.)

I guess scons -k is the correct command for my purpose (to test later steps while some first steps may fail) but I still wonder, when to use -i, because ignoring errors should result in building more and more things as well. Or -i ignores exceptions as long as all target files will still be created successfully and -k even continues if files are not created?

like image 335
Amegon Avatar asked May 23 '14 09:05

Amegon


People also ask

What is SCons build?

SCons is a computer software build tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the target operating system platform.

What does SCons command do?

scons can scan known input files automatically for dependency information (for example, #include statements in C or C++ files) and will rebuild dependent files appropriately whenever any "included" input file changes. scons supports the ability to define new scanners for unknown input file types.

What is SCons Linux?

What is SCons? SCons is an Open Source software construction tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache.

What compiler does SCons use?

The Visual C++ compiler option that SCons uses by default to generate PDB information is /Z7 . This works correctly with parallel ( -j ) builds because it embeds the debug information in the intermediate object files, as opposed to sharing a single PDB file between multiple object files.


1 Answers

The "-i" option marks the failed nodes as "executed", just as if building the target was successful. So a parent, depending on the actually failed node, may handle the missing file as empty content for example and happily continues...leaving your final target in a possibly inconsistent state.

This can't happen with "-k" because it marks all parents up the tree as "failed" immediately, and never tries to build any of them. This means that all remaining created targets should be consistent regarding their dependencies, and ready for production use.

like image 138
dirkbaechle Avatar answered Oct 01 '22 04:10

dirkbaechle