Tags: bazelbuild/apple_support
Tags
Consume the pipes before waiting for pid (#411) In general one shouldn't call waitpid until the child closed its end of the pipe. This works fine with libtool invocations that do not produce more than `_PC_PIPE_BUF` bytes of output but deadlocks when the pipe fills up.
Revert "Fix oso_prefix paths (#347)" (#405) This linker bug was fixed in Xcode 16.3. It would be a bit of a pain to support both so this just reverts the fix and users on the older versions should stay on older apple_supports until they upgrade Xcode. Fixes #401 Fixes #404 This reverts commit 8ee7a2d.
Remove relative path to wrapped_clang from osx_cc_wrapper.sh (#395) Otherwise path mapping does not work with these files since the path to wrapped clang contained the transition hash. Now we fetch the relative path to wrapped_clang dynamically.
Move toolchain tool setup out of repo rule (#393) Now that we're building the tools used in the toolchain as normal rules, there's really no need for them to be part of the toolchain setup. This is more understandable in general since it removes a layer of indirection.
Fix oso_prefix paths (#347) When bazel executions actions in the sandbox, pwd is a path like this: ``` /private/var/tmp/_bazel_ksmiley/92410d0e3373f265902564b48493ac12/sandbox/darwin-sandbox/8/execroot/_main ``` Inside this directory are the inputs, which are symlinks to outside of this pwd: ``` /private/var/tmp/_bazel_ksmiley/92410d0e3373f265902564b48493ac12/sandbox/darwin-sandbox/1/execroot/_main/bazel-out/darwin_arm64-dbg/bin/_objs/main/main.o -> /private/var/tmp/_bazel_ksmiley/92410d0e3373f265902564b48493ac12/execroot/_main/bazel-out/darwin_arm64-dbg/bin/_objs/main/main.o ``` ld64 resolves the absolute path to this object file, including resolving symlinks, _before_ it strips the -oso_prefix argument. Because of this the previous `__BAZEL_EXECUTION_ROOT__` replacement, which was the sandbox pwd, isn't actually a prefix of the canonicalized object file path, leading to -oso_prefix being a no-op, and absolute paths ending up in the binary. I think many folks didn't see this locally because it's common for Apple projects to disable sandboxing for local development for perf reasons, and that's when you're likely to have this debug info in the binary in the first place. With this change we add a new substitution that calculates the sandbox-independent prefix and passes that along instead.
PreviousNext