Skip to content

Current clang version doesn't build against the iOS 26 SDK, unknown platform 'visionos' #172335

@hellohuanlin

Description

@hellohuanlin

Use case

Related Issue: #171755 (comment)

I got this compile error on iOS 26

/Users/huanlin/Desktop/flutter/flutter/engine/src/flutter/prebuilts/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/Headers/XCTMetric.h:380:66: error: unknown platform 'visionos' in availability macro [-Werror,-Wavailability]
  380 | API_AVAILABLE(macos(16.0), ios(19.0), watchos(12.0), tvos(19.0)) API_UNAVAILABLE(visionos)
      |                                                                  ^
../../flutter/prebuilts/SDKs/iPhoneOS26.0.sdk/usr/include/os/availability.h:180:374: note: expanded from macro 'API_UNAVAILABLE'
  180 |     #define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO_93585900(__VA_ARGS__,__API_UNAVAILABLE15,__API_UNAVAILABLE14,__API_UNAVAILABLE13,__API_UNAVAILABLE12,__API_UNAVAILABLE11,__API_UNAVAILABLE10,__API_UNAVAILABLE9,__API_UNAVAILABLE8,__API_UNAVAILABLE7,__API_UNAVAILABLE6,__API_UNAVAILABLE5,__API_UNAVAILABLE4,__API_UNAVAILABLE3,__API_UNAVAILABLE2,__API_UNAVAILABLE1,__API_UNAVAILABLE0,0)(__VA_ARGS__)
      |                    

The compiler is able to recognize macos, ios, watchos, tvos, but doesn't recognize visionos.

Then I replaced our clang under buildtools with the copy under Xcode 26, and it worked.

Proposal

Update clang CIPD package

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-iosiOS applications specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions