esp-idf/tools/test_apps/system/no_embedded_paths
Angus Gratton 9b988ca097 config: Add new option to replace IDF_PATH and project path with placeholders in macros
Allows building with asserts on and still not finding any actual file paths in the
final binary file.

Alternative fix for https://github.com/espressif/esp-idf/issues/6306

Progress towards https://github.com/espressif/esp-idf/issues/5873
2021-03-03 10:31:05 +11:00
..
main config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00
check_for_file_paths.py ci: Add a test app for not placing embedded file paths into binaries 2021-03-03 10:31:05 +11:00
CMakeLists.txt config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00
README.md config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00
sdkconfig.ci.noasserts config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00
sdkconfig.ci.noasserts.nimble config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00
sdkconfig.ci.replacepaths config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00
sdkconfig.ci.silentasserts config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00
sdkconfig.ci.silentasserts.nimble config: Add new option to replace IDF_PATH and project path with placeholders in macros 2021-03-03 10:31:05 +11:00

No Embedded Paths

This test app exists to verify that paths (like FILE) are not compiled into any object files in configurations where this should be avoided.

Configurations where this is relevant include:

  • Assertions disabled (doubles up as a build-time check that disabling assertions doesn't lead to any warnings)
  • Silent assertions
  • CONFIG_COMPILER_HIDE_PATHS_MACROS is set to replace IDF_PATH and project dir with placeholders when expanding __FILE__

Not embedding paths reduces the binary size, avoids leaking information about the compilation environment, and is a necessary step to support reproducible builds across projects built in different directories.