diff --git a/scripts/west_commands/sign.py b/scripts/west_commands/sign.py index 54006e565c741db..80783bce900be01 100644 --- a/scripts/west_commands/sign.py +++ b/scripts/west_commands/sign.py @@ -444,6 +444,12 @@ def preprocess_toml(self, config_dir, toml_basename, subdir): # unfortunately don't seem to make any difference here and they're # gcc-specific) preproc_cmd += ['-P'] + # REM allows standalone comments to be preserved in generated/*.toml. + # A "double" `REM # my comment...` is not necessary but recommended for + # syntax highlighting. + # Note trailing comments are ignored by cpp and don't need any REM + # trick, a trailing `#` is enough. + preproc_cmd += ['-DREM=#'] preproc_cmd += ['-I', str(self.sof_src_dir / 'src')] preproc_cmd += ['-imacros', str(pathlib.Path('zephyr') / 'include' / 'generated' / 'autoconf.h')]