-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
build: make dynamic modules work on macos #38437
Merged
mattklein123
merged 17 commits into
envoyproxy:main
from
mathetake:macosfixbazeldynamicmodules
Feb 16, 2025
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
56f094f
build: run dynamic modules test on macos
mathetake 5422aaf
try
mathetake e1cba96
try
mathetake 5b1cb77
more
mathetake 93cc91e
make it work
mathetake a9597d3
more
mathetake 7ff4900
more
mathetake cff2413
try
mathetake 5603c7b
try
mathetake 7a15ac6
more
mathetake 97923e3
more
mathetake 619a67d
Merge remote-tracking branch 'origin/main' into macosfixbazeldynamicm…
mathetake 4b50b64
more
mathetake 16c0cf0
more
mathetake 693345c
fix
mathetake 41e7483
more
mathetake fe984cd
more consistency
mathetake File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
lua*; | ||
envoyGo*; | ||
envoy_dynamic_module_callback_*; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
_lua* | ||
_envoyGo* | ||
_envoy_dynamic_module_callback_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,45 +15,6 @@ envoy_cc_library( | |
"abi.h", | ||
"dynamic_modules.h", | ||
], | ||
linkopts = select({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: we no longer need to manually list callback symbols here! |
||
"//bazel:apple": [], | ||
"//conditions:default": [ | ||
# Export callback symbols so that they can be found by the dynamic modules when loaded via dlopen. | ||
# | ||
# Note: with lld, we can use the glob matching to avoid listing all the symbols, but gold and ld are | ||
# not able to do that. So we list all the symbols here. | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_header", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_headers", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_headers_count", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_set_request_header", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_trailer", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_trailers", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_trailers_count", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_set_request_trailer", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_header", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_headers", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_headers_count", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_set_response_header", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_trailer", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_trailers", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_trailers_count", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_set_response_trailer", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_send_response", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_set_dynamic_metadata_number", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_dynamic_metadata_number", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_set_dynamic_metadata_string", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_dynamic_metadata_string", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_body_vector", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_request_body_vector_size", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_append_request_body", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_drain_request_body", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_body_vector", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_get_response_body_vector_size", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_append_response_body", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_drain_response_body", | ||
"-Wl,--export-dynamic-symbol=envoy_dynamic_module_callback_http_clear_route_cache", | ||
], | ||
}), | ||
deps = [ | ||
":abi_version_lib", | ||
"//envoy/common:exception_lib", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: this is the minimal test that ensures the dynamic loading/symbol resolution working