diff --git a/Library/Homebrew/os/mac/sdk.rb b/Library/Homebrew/os/mac/sdk.rb index 5fc79d62687b1..c7f3ef37ff384 100644 --- a/Library/Homebrew/os/mac/sdk.rb +++ b/Library/Homebrew/os/mac/sdk.rb @@ -91,6 +91,14 @@ def sdk_paths paths[OS::Mac::Version.new(version)] = sdk_path if version.present? end + # Use unversioned SDK path on Big Sur to avoid issues such as: + # https://github.com/Homebrew/homebrew-core/issues/67075 + if OS::Mac.version >= :big_sur + sdk_path = File.join(sdk_prefix, "MacOSX.sdk") + version = OS::Mac.full_version + paths[version] = sdk_path if File.directory?(sdk_path) + end + paths else {}