Skip to content
Browse files

extensions.cmake: don't leak absolute paths in snippets-*.ld comment

Make headers look like this instead:

     /* From ${ZEPHYR_BASE}/arch/common/isr_tables.ld: */

Besides being shorter and more "private", this makes the content of
snippets-*.ld files the same no matter who built them and where.

Signed-off-by: Marc Herbert <>
  • Loading branch information...
marc-hb authored and carlescufi committed May 23, 2019
1 parent 8b9b7e7 commit d1b4da96e1484a276c21c330d3b878237537dc22
Showing with 3 additions and 1 deletion.
  1. +3 −1 cmake/extensions.cmake
@@ -835,7 +835,9 @@ function(zephyr_linker_sources location)

# Append the file contents to the relevant destination file.
file(READ ${path} snippet)
file(APPEND ${snippet_path} "\n/* From ${path}: */\n" "${snippet}\n")
file(RELATIVE_PATH relpath ${ZEPHYR_BASE} ${path})
file(APPEND ${snippet_path}
"\n/* From \${ZEPHYR_BASE}/${relpath}: */\n" "${snippet}\n")

0 comments on commit d1b4da9

Please sign in to comment.
You can’t perform that action at this time.