Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zephyr: Support cmake args. Add -Werror in CI #4733

Merged
merged 4 commits into from
Sep 9, 2021

Commits on Sep 8, 2021

  1. xtensa-build-zephyr: extract new parse_args() function from main()

    main() was growing too big. Zero functional change.
    
    Also rename the too generic "build()" to build_all()
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
    marc-hb committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    9e421ae View commit details
    Browse the repository at this point in the history
  2. xtensa-build-zephyr: support passing through CMake arguments

    Like this:
    
      xtensa-build-zephyr.sh -a -- -DEXTRA_CFLAGS='-Werror -Wextra'
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
    marc-hb committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    c2e8837 View commit details
    Browse the repository at this point in the history
  3. zephyr/docker-build.sh: pass arguments through to xtensa-build-zephyr.sh

    Allows passing compilation flags and any other argument.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
    marc-hb committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    77f111c View commit details
    Browse the repository at this point in the history
  4. .github/zephyr: add -Werror

    Because we can. This would have caught this regression from
    commit 287a5f9 ("ssp: mclk/bclk turned off unexpectedly")
    
    -DEXTRA_CFLAGS is not very well documented but it is what Zephyr uses,
    try `git -C zephyr grep -C 5 EXTRA_CFLAGS and see.
    
    ```
    sof/src/drivers/intel/ssp/ssp.c: In function 'ssp_set_config_tplg':
    sof/zephyr/include/sof/trace/trace.h:44:11: warning:
                       too many arguments for format [-Wformat-extra-args]
       44 |    printk("%llu: " format "\n", platform_timer_get(NULL), \
          |           ^~~~~~~~
      ...
    sof/src/drivers/intel/ssp/ssp.c:763:4: note: in expansion of macro 'dai_info'
      763 |    dai_info(dai, "ssp_set_config(): hw_free stage:
                         ignore since there is still user", dai->index);
    ```
    
    Using -Werror only in CI avoids slowing down developers with temporary
    warnings they intend on fixing later (but before submission)
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
    marc-hb committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    d1e612b View commit details
    Browse the repository at this point in the history