diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 73c20fcb5b67..354efb207f0f 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -194,8 +194,7 @@ jobs: --cmake-args=-DEXTRA_CXXFLAGS=-Werror --cmake-args=-DEXTRA_AFLAGS='-Werror -Wa,--fatal-warnings' --cmake-args=--warn-uninitialized - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY=y - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY_WITH_SOURCE=n + --overlay=sof/app/overlays/repro-build.conf ${{ matrix.build_opts }} ${{ matrix.IPC_platforms }} - name: Upload build artifacts @@ -361,8 +360,7 @@ jobs: --cmake-args=-DEXTRA_CXXFLAGS=-Werror --cmake-args=-DEXTRA_AFLAGS='-Werror -Wa,--fatal-warnings' --cmake-args=--warn-uninitialized - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY=y - --cmake-args=-DCONFIG_OUTPUT_DISASSEMBLY_WITH_SOURCE=n + --overlay=sof/app/overlays/repro-build.conf ${{ matrix.build_opts }} ${{ matrix.platforms }} - name: Upload build artifacts diff --git a/app/overlays/repro-build.conf b/app/overlays/repro-build.conf new file mode 100644 index 000000000000..d7b434c39660 --- /dev/null +++ b/app/overlays/repro-build.conf @@ -0,0 +1,2 @@ +CONFIG_OUTPUT_DISASSEMBLY=y +CONFIG_OUTPUT_DISASSEMBLY_WITH_SOURCE=n diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 648393ed70ff..44b9d7167902 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -256,8 +256,15 @@ def parse_args(): " to cmake (for rimage)") parser.add_argument("-k", "--key", type=pathlib.Path, required=False, help="Path to a non-default rimage signing key.") + + # https://docs.zephyrproject.org/latest/build/kconfig/setting.html#initial-conf + # https://docs.zephyrproject.org/latest/develop/application/index.html#important-build-system-variables parser.add_argument("-o", "--overlay", type=pathlib.Path, required=False, action='append', - default=[], help="Paths to overlays") + default=[], help= +"""All '-o arg1 -o arg2 ...' arguments are combined into a single -DEXTRA_CONF_FILE='arg1;arg2;...' +list. Files latter in the list seem to have precedence. Direct -C=-DCONFIG_xxx=.. options seem to +have precedence over -DEXTRA_CONF_FILE=... Rely on precedence as little as possible.""") + parser.add_argument("-p", "--pristine", required=False, action="store_true", help="Perform pristine build removing build directory.") parser.add_argument("-u", "--update", required=False, action="store_true", @@ -832,7 +839,7 @@ def build_platforms(): if overlays: overlays = ";".join(overlays) - build_cmd.append(f"-DOVERLAY_CONFIG={overlays}") + build_cmd.append(f"-DEXTRA_CONF_FILE={overlays}") abs_build_dir = pathlib.Path(west_top, platform_build_dir_name)