From 4930eb6de0b65f1543bd09e403ce4cc8b1d4dd65 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 18 Sep 2025 11:45:40 -0700 Subject: [PATCH] Add documentation about CMAKE_OSX_SYSROOT so that folks bringing up on OSX can have a clean test run. --- llvm/docs/CMake.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst index 438a84d39ed66..7e95545425f2d 100644 --- a/llvm/docs/CMake.rst +++ b/llvm/docs/CMake.rst @@ -1200,3 +1200,14 @@ Windows When compiling with clang-cl, CMake may use ``llvm-mt`` as the Manifest Tool when available. ```llvm-mt``` is only present when libxml2 is found at build-time. To ensure using Microsoft's Manifest Tool set `CMAKE_MT=mt`. + +Apple/OSX +--------- + +**CMAKE_OSX_SYSROOT**:STRING + When compiling for OSX, in order for the test suite to find libSystem to link + dylib tests you'll need to run CMake with ```xcrun --show-sdk-path``` as the + string to pass in so that the testsuite can find your os libraries. + + This will show up as ```ld: library not found for -lSystem``` when running + tests.