File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -655,9 +655,12 @@ class BuildScriptInvocation(object):
655
655
]
656
656
657
657
# Isolate build from the system; Darwin toolchains build against SDKs.
658
- args .extra_cmake_options .append (
659
- '-DCMAKE_IGNORE_PATH=/usr/lib;/usr/local/lib;/lib'
660
- )
658
+ # For additional isolation, disable pkg-config. Homebrew's pkg-config
659
+ # prioritizes CommandLineTools paths, resulting in compile errors.
660
+ args .extra_cmake_options += [
661
+ '-DCMAKE_IGNORE_PATH=/usr/lib;/usr/local/lib;/lib' ,
662
+ '-DPKG_CONFIG_EXECUTABLE=/usr/bin/true' ,
663
+ ]
661
664
662
665
if toolchain .libtool is not None :
663
666
impl_args += [
Original file line number Diff line number Diff line change @@ -632,17 +632,6 @@ function set_build_options_for_host() {
632
632
633
633
cmake_os_sysroot=" $( xcrun --sdk ${platform} --show-sdk-path) "
634
634
635
- # Customize the CMake `find_*` search paths to search the SDK
636
- # sysroot before searching `pkg-config` paths. This prevents compile
637
- # failures caused when `pkg-config` returns CommandLineTools paths
638
- # instead of Xcode paths.
639
- #
640
- # These search paths can be user customized either by setting the
641
- # `CMAKE_PREFIX_PATH` environment variable, or by setting the same
642
- # CMake variable via the command line (`-DCMAKE_PREFIX_PATH`).
643
- # See https://cmake.org/cmake/help/latest/command/find_path.html
644
- export CMAKE_PREFIX_PATH=" ${CMAKE_PREFIX_PATH} :${cmake_os_sysroot} /usr"
645
-
646
635
cmark_cmake_options=(
647
636
-DCMAKE_C_FLAGS=" $( cmark_c_flags ${host} ) "
648
637
-DCMAKE_CXX_FLAGS=" $( cmark_c_flags ${host} ) "
You can’t perform that action at this time.
0 commit comments