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

fix(toolchain): multiple fixes for cxx cross build and on macOS #12945

Merged
merged 7 commits into from
Apr 26, 2024

Conversation

fffonion
Copy link
Contributor

@fffonion fffonion commented Apr 26, 2024

Summary

  • Fix macOS build by using cc_shared_library but hide after an alias and not turned on outside macOS.
  • Pass basic cc and ld flags to cross compilers, noticably (the below changes doesn't apply to non-cross builds, however they are already set by Bazel in those environments):
    • Decreases opt flags from default -O3 to -O2
    • Add security flags like -U_FORTIFY_SOURCE, -fstack-protector etc (please check sources for full list of flags)
    • Link to stdc++
  • Use a cleaner interface and remove the wrapper for cross tool path resolving.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

@github-actions github-actions bot added chore Not part of the core functionality of kong, but still needed build/bazel cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Apr 26, 2024
@fffonion fffonion force-pushed the add-toolchain-config branch 2 times, most recently from 2b90f20 to 65a6be3 Compare April 26, 2024 08:20
@fffonion fffonion force-pushed the add-toolchain-config branch 2 times, most recently from dc83d26 to 49a0056 Compare April 26, 2024 09:45
@fffonion fffonion force-pushed the add-toolchain-config branch from 7903604 to 6621f93 Compare April 26, 2024 09:51
@fffonion fffonion force-pushed the add-toolchain-config branch from 6621f93 to 1494600 Compare April 26, 2024 10:07
@fffonion
Copy link
Contributor Author

@fffonion fffonion force-pushed the add-toolchain-config branch from 1494600 to cb3d40c Compare April 26, 2024 10:22
@dndx
Copy link
Member

dndx commented Apr 26, 2024

Thanks for the effort @fffonion .

@dndx dndx merged commit 6f06a57 into master Apr 26, 2024
31 checks passed
@dndx dndx deleted the add-toolchain-config branch April 26, 2024 10:49
@team-gateway-bot
Copy link
Collaborator

Cherry-pick failed for master, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12945-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12945-to-master-to-upstream
git checkout -b cherry-pick-12945-to-master-to-upstream
ancref=$(git merge-base a5a61d645aad3107d4c742cf9537bb4d673c8fbe cb3d40c67b426ea6232dcdb1438794461a3f33dd)
git cherry-pick -x $ancref..cb3d40c67b426ea6232dcdb1438794461a3f33dd

@github-actions github-actions bot added the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Apr 26, 2024
@locao locao removed the incomplete-cherry-pick A cherry-pick was incomplete and needs manual intervention label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/bazel cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee chore Not part of the core functionality of kong, but still needed size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants