Detect macOS SDK path via xcrun for Apple toolchain sysroot (fixing bazel run format on certain MacOS setups)

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Bazel
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The sdkroot build setting hardcoded the Xcode.app SDK path, which does not exist on machines with only Command Line Tools installed. This broke 'bazel run format' (and any build using the Apple C++ toolchain) with 'ld: library System not found' when linking the Rust process_wrapper.

      Detect the active SDK path with 'xcrun --sdk macosx --show-sdk-path' at toolchain configuration time, falling back to the Xcode.app path.

            Assignee:
            Zac Codiamat
            Reporter:
            Zac Codiamat
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: