3.1.1.3. TI ARM CGT Helper Tools
The tool is located in tools/waf-tools.
3.1.1.3.1. Tool Documentation
A tool to write the ARM CGT compiler builtin defines (based on the given flags) into a separate file
- f_ti_arm_helper.get_defines(self, *k, **kw)
- Wrapper function to get all predefined compiler defines. Based on - waflib.Tools.c_config.check(). This function uses- run_build_for_defines()to perform the actual build- This implementation is based on - waflib.Tools.c_config.check: We do the same, as in c_config.check, except, that we use- run_build_for_defines(), which is based on waf’s run_build to create a persistent build directory. This is required as we need to parse the testbuild output in order to get the list of predefined defines of the compiler. We could have also used waf’s default –confcache option and set –confcache’s default to 1, but this would create a really cluttered output directory (Every test build of a configure command would be persistent). With this implementation we can still use waf’s default check(…) feature along with it’s option –confcache to have a good debug experience on the build process while not cluttering the output directory.
- f_ti_arm_helper.run_build_for_defines(self, *_, **kw)
- Runs a build during configuration time. The build is based on - waflib.Configure.run_build(). In contrast to a test build during configuration the output is persistent. This output is used to determine the predefined compiler defines.- This implementation is based on - waflib.Configure.run_build: We do the same as in run_build, except, that we hard code the output directory and change the return value to return the build success/failure and the path of the build directory- Parameters:
- out_name (string) – name of the output directory. Needs to be passed as kw. 
- Returns:
- A tuple containing the success of the build and the path to the output directory 
- Return type:
- tuple 
 
