-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: use Bazel 1.1.0 #8739
build: use Bazel 1.1.0 #8739
Changes from 4 commits
b2dc448
4836b4b
d3af1a0
71fa175
5d2c794
5ff7bc8
98c1556
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.29.1 | ||
1.1.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,54 @@ | ||
diff --git a/mocktracer/BUILD b/mocktracer/BUILD | ||
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. Can we get this fixed upstream? CC @g-easy 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. CC @rnburn for OpenTracing ;) 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. |
||
index 3b22bab..894eeea 100644 | ||
--- a/mocktracer/BUILD | ||
+++ b/mocktracer/BUILD | ||
@@ -7,13 +7,19 @@ cc_library( | ||
deps = [ | ||
"//:opentracing", | ||
], | ||
+ alwayslink = 1, | ||
) | ||
|
||
cc_binary( | ||
name = "libmocktracer_plugin.so", | ||
+ linkopts = [ | ||
+ "-Wl,--version-script=$(location :tracer-export-map.ld)", | ||
+ ], | ||
linkshared = 1, | ||
+ linkstatic = 1, | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
- "//mocktracer:mocktracer" | ||
+ "//mocktracer", | ||
+ "//mocktracer:tracer-export-map.ld", | ||
], | ||
) | ||
diff --git a/mocktracer/tracer-export-map.ld b/mocktracer/tracer-export-map.ld | ||
new file mode 100644 | ||
index 0000000..66a4a4f | ||
--- /dev/null | ||
+++ b/mocktracer/tracer-export-map.ld | ||
@@ -0,0 +1,5 @@ | ||
+{ | ||
+ global: | ||
+ OpenTracingMakeTracerFactory; | ||
+ local: *; | ||
+}; | ||
diff --git a/src/dynamic_load_unix.cpp b/src/dynamic_load_unix.cpp | ||
index 17e08fd..d25e0c8 100644 | ||
index 17e08fd..7e8ac02 100644 | ||
--- a/src/dynamic_load_unix.cpp | ||
+++ b/src/dynamic_load_unix.cpp | ||
@@ -35,7 +35,11 @@ DynamicallyLoadTracingLibrary(const char* shared_library, | ||
@@ -35,7 +35,13 @@ DynamicallyLoadTracingLibrary(const char* shared_library, | ||
std::string& error_message) noexcept try { | ||
dlerror(); // Clear any existing error. | ||
|
||
- const auto handle = dlopen(shared_library, RTLD_NOW | RTLD_LOCAL); | ||
+ const auto handle = dlopen(shared_library, RTLD_NOW | RTLD_LOCAL | ||
+#ifdef __SANITIZE_ADDRESS__ | ||
+#if defined(__has_feature) | ||
+#if __has_feature(address_sanitizer) | ||
+ | RTLD_NODELETE | ||
+#endif | ||
+#endif | ||
+ ); | ||
if (handle == nullptr) { | ||
error_message = dlerror(); | ||
|
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.
@keith I believe this is workaround for bazelbuild/bazel#9154
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.
We should update rules_foriegn_cc instead where this is fixed
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.
@keith No that doesn't fix, I guess rules_foreign_cc only fixed cmake, not configure_make, I still need this one.
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.
We should fix it there too then 😞