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

Cannot link standard libraries in native build #152

Open
danielpieczko opened this issue May 1, 2024 · 0 comments
Open

Cannot link standard libraries in native build #152

danielpieczko opened this issue May 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@danielpieczko
Copy link
Collaborator

Applications using lib_xcore_math can be built for the native host instead of xcore, and in that case they need to link with the -lm option. We don't have a way to specify that through the LIB_COMPILER_FLAGS option or similar. There is a workaround, which is something like this in lib_build_info.cmake:

...
XMOS_REGISTER_MODULE()

if(BUILD_NATIVE)
    foreach(target ${APP_BUILD_TARGETS})
        target_link_libraries(${target} PRIVATE m)
    endforeach()
endif()
@danielpieczko danielpieczko added the enhancement New feature or request label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant