| 1 | Description: Add compiler flag to support reproducible builds. |
| 2 | The `-ffile-prefix-map` flag is added to the clang compiler options |
| 3 | to prevent the absolute path of the source directory from being embedded |
| 4 | in the compiled binaries. This is a common practice for making builds |
| 5 | reproducible. |
| 6 | Author: Gavin Lai <[email protected]> |
| 7 | Last-Update: 2026-02-16 |
| 8 | Forwarded: not-needed |
| 9 | --- a/CMakeLists.txt |
| 10 | +++ b/CMakeLists.txt |
| 11 | @@ -178,6 +178,7 @@ |
| 12 | set(CLANG_FLAGS -Wall -O2 -fno-stack-protector |
| 13 | -I ${ASM_INCLUDE} |
| 14 | -I ${PROJECT_BINARY_DIR} # required for app_config.h |
| 15 | + -ffile-prefix-map=${CMAKE_SOURCE_DIR}=. |
| 16 | ) |
| 17 | |
| 18 | function(add_xdp_prog name) |