File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 505505
506506using namespace std;
507507
508+ #ifdef __APPLE__
509+ #define DYNAMIC_LIB_EXT "dylib"
510+ #else
511+ #define DYNAMIC_LIB_EXT "so"
512+ #endif
513+
508514int main() {
509- void* handle = dlopen("libf.so" , RTLD_LAZY);
515+ void* handle = dlopen("libf." DYNAMIC_LIB_EXT , RTLD_LAZY);
510516
511517 typedef string (*f_t)();
512518
Original file line number Diff line number Diff line change 1616load (
1717 "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl" ,
1818 "action_config" ,
19+ "artifact_name_pattern" ,
1920 "env_entry" ,
2021 "env_set" ,
2122 "feature" ,
@@ -3007,7 +3008,15 @@ def _impl(ctx):
30073008 else :
30083009 fail ("Unreachable" )
30093010
3010- artifact_name_patterns = []
3011+ # macOS artifact name patterns differ from the defaults only for dynamic
3012+ # libraries.
3013+ artifact_name_patterns = [
3014+ artifact_name_pattern (
3015+ category_name = "dynamic_library" ,
3016+ prefix = "lib" ,
3017+ extension = ".dylib" ,
3018+ ),
3019+ ]
30113020
30123021 make_variables = [
30133022 make_variable (
You can’t perform that action at this time.
0 commit comments