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

Link warning when enabling LTO for native simulator based targets #68737

Closed
aescolar opened this issue Feb 8, 2024 · 0 comments · Fixed by #68732
Closed

Link warning when enabling LTO for native simulator based targets #68737

aescolar opened this issue Feb 8, 2024 · 0 comments · Fixed by #68732
Assignees
Labels
area: Build System area: native port Host native arch port (native_sim) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@aescolar
Copy link
Member

aescolar commented Feb 8, 2024

Describe the bug
If CONFIG_LTO is set, the partial link done for native simulator based targets will produce a warning.
This warning is due to mixing objects built with and without LTO enabled, and informs the users that
LTO will be ignored.

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -GNinja -DBOARD=native_sim ../samples/hello_world/ -DCONFIG_LTO=y
  3. ninja
  4. See warning

Expected behavior
No link warnings

Impact
twister/CI failures for samples/tests which enable LTO in their default configuration

Logs and console output
See for example this CI failure for a PR which attempted to enable LTO in the configuration of a sample:
https://github.com/zephyrproject-rtos/zephyr/actions/runs/7816163519/job/21321300058?pr=68694#step:13:897

Environment (please complete the following information):

  • OS: Linux Ubuntu 22.04/CI
  • Toolchain (e.g Zephyr SDK, ...): gcc 11 or 12
  • Commit SHA or Version used: Today's main b30d088

Additional context
The feature was introduced in #66392

@aescolar aescolar added bug The issue is a bug, or the PR is fixing a bug area: Build System area: native port Host native arch port (native_sim) labels Feb 8, 2024
@aescolar aescolar self-assigned this Feb 8, 2024
@aescolar aescolar added the priority: low Low impact/importance bug label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: native port Host native arch port (native_sim) bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant