Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use the clang command with the "-isysroot" flag on macOS #3883

Closed
zp1996 opened this issue Feb 12, 2025 · 1 comment
Closed

Use the clang command with the "-isysroot" flag on macOS #3883

zp1996 opened this issue Feb 12, 2025 · 1 comment
Labels
bug Bug report

Comments

@zp1996
Copy link

zp1996 commented Feb 12, 2025

Describe the bug
When there are multiple Xcode.app installed on the local machine and the Xcode SDK path is changed using xcode-select, for example:

xcode-select -s /Applications/Xcode16.app/Contents/Developer
# Xcode SDK path
/Applications/Xcode16.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

If the SYSROOT environment variable is not specified locally, it will cause compilation errors.

fatal error: 'TargetConditionals.h' file not found

To ensure compatibility with these scenarios, it is recommended to specify the -isysroot flag for clang. Chromium has also made similar adjustments in build/config/mac/BUILD.gn.

@zp1996 zp1996 added the bug Bug report label Feb 12, 2025
@magreenblatt
Copy link
Collaborator

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants