@@ -315,39 +315,46 @@ pkg_files(
315315 ("otel_sdk_rd" , "fastbuild" ),
316316]]
317317
318- # Collect all sources in a .src.zip bundle using sentry-cli - https://docs.sentry.io/product/cli/dif/
319318[run_binary (
320- name = otel_sdk_binary + "_make_src_bundle_windows " ,
319+ name = otel_sdk_binary + "_make_src_bundle" + "_windows " ,
321320 srcs = [otel_sdk_binary + "_pdb_file" ],
322321 outs = [otel_sdk_binary + ".src.zip" ],
323322 args = [
324323 "debug-files" ,
325324 "bundle-sources" ,
326- "$(location " + otel_sdk_binary + "_pdb_file" + ")" ,
325+ "$(execpath " + otel_sdk_binary + "_pdb_file" + ")"
327326 ],
328- tags = ["manual" ],
329327 tool = "@multitool//tools/sentry-cli" ,
328+ target_compatible_with = select ({
329+ "@platforms//os:windows" : None ,
330+ "//conditions:default" : ["@platforms//:incompatible" ],
331+ }),
330332) for otel_sdk_binary in [
331333 "otel_sdk_r" ,
332334 "otel_sdk_d" ,
333335 "otel_sdk_rd" ,
334336]]
335337
336338[run_binary (
337- name = otel_sdk_binary + "_make_src_bundle_non_windows" ,
338- srcs = [otel_sdk_binary + "_dsym_file" ],
339+ name = otel_sdk_binary + "_make_src_bundle" + "_non_windows" ,
340+ srcs = select ({
341+ "@platforms//os:macos" : [otel_sdk_binary + "_dsym_file" ],
342+ "//conditions:default" : [otel_sdk_binary ],
343+ }),
339344 outs = ["lib" + otel_sdk_binary + ".src.zip" ],
340345 args = [
341346 "debug-files" ,
342347 "bundle-sources" ,
343- "$(location " + otel_sdk_binary + "_dsym_file" + ")" ,
344- ],
345- tags = [
346- "manual" ,
347- # TODO - Fix this to work in the sandbox, by using sentry-cli's -o folder
348- "no-sandbox" ,
349- ],
348+ ] + select ({
349+ "@platforms//os:macos" : ["$(execpath " + otel_sdk_binary + "_dsym_file" + ")" ],
350+ "//conditions:default" : ["$(execpath " + otel_sdk_binary + ")" ],
351+ }),
352+ tags = ["no-sandbox" ],
350353 tool = "@multitool//tools/sentry-cli" ,
354+ target_compatible_with = select ({
355+ "@platforms//os:windows" : ["@platforms//:incompatible" ],
356+ "//conditions:default" : None ,
357+ }),
351358) for otel_sdk_binary in [
352359 "otel_sdk_r" ,
353360 "otel_sdk_d" ,
@@ -357,8 +364,8 @@ pkg_files(
357364[alias (
358365 name = otel_sdk_binary + "_make_src_bundle" ,
359366 actual = select ({
360- "@platforms//os:windows" : otel_sdk_binary + "_make_src_bundle_windows " ,
361- "//conditions:default" : otel_sdk_binary + "_make_src_bundle_non_windows" ,
367+ "@platforms//os:windows" : otel_sdk_binary + "_make_src_bundle" + "_windows " ,
368+ "//conditions:default" : otel_sdk_binary + "_make_src_bundle" + "_non_windows"
362369 }),
363370) for otel_sdk_binary in [
364371 "otel_sdk_r" ,
@@ -459,7 +466,7 @@ write_source_file(
459466 name = "dll_deps_update_run_" + os ,
460467 srcs = [":otel_sdk_all_deps_" + os ],
461468 outs = ["dll_deps_generated_internally_" + os + ".bzl" ],
462- args = ["$(location dll_deps_generated_internally_" + os + ".bzl)" ],
469+ args = ["$(execpath dll_deps_generated_internally_" + os + ".bzl)" ],
463470 tool = "dll_deps_update_binary_" + os ,
464471) for os in [
465472 "non_windows" ,
0 commit comments