Commit a27e8f9a authored by Marc Herbert's avatar Marc Herbert Committed by Anas Nashif
Browse files

west: sign.py: explain why `-P` is passed to cpp

Zero-functional change.

Also move it to a separate line so it's more convenient to temporarily
comment it out.

Signed-off-by: default avatarMarc Herbert <marc.herbert@intel.com>
parent 2ee6c26d
Loading
Loading
Loading
Loading
+6 −1
Changes for scripts/west_commands/sign.py: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -438,7 +438,12 @@ class RimageSigner(Signer):
        'Runs the C pre-processor on config_dir/toml_basename.h'

        compiler_path = self.cmake_cache.get("CMAKE_C_COMPILER")
        preproc_cmd = [compiler_path, '-P', '-E', str(config_dir / (toml_basename + '.h'))]
        preproc_cmd = [compiler_path, '-E', str(config_dir / (toml_basename + '.h'))]
        # -P removes line markers to keep the .toml output reproducible.  To
        # trace #includes, temporarily comment out '-P' (-f*-prefix-map
        # unfortunately don't seem to make any difference here and they're
        # gcc-specific)
        preproc_cmd += ['-P']
        preproc_cmd += ['-I', str(self.sof_src_dir / 'src')]
        preproc_cmd += ['-imacros',
                        str(pathlib.Path('zephyr') / 'include' / 'generated' / 'autoconf.h')]