The addition of displaySyncEnabled in JDK-8232164 gives the following warning when built with Xcode 10.1 and either the macOS 10.13 or 10.14 SDK:
/Users/kcr/java/lanai/open/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m:100:14: warning: 'setDisplaySyncEnabled:' is only available on macOS 10.13 or newer [-Wunguarded-availability-new]
self.displaySyncEnabled = NO;
^~~~~~~~~~~~~~~~~~
/var/tmp/jib-kcr/install/jpg/infra/builddeps/devkit-macosx_x64/Xcode10.1-MacOSX10.14+1.0/devkit-macosx_x64-Xcode10.1-MacOSX10.14+1.0.tar.gz/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:116:16: note: 'setDisplaySyncEnabled:' has been explicitly marked partial here
@property BOOL displaySyncEnabled API_AVAILABLE(macos(10.13));
^
This fails the build unless you specify `--disable-warnings-as-errors` since the current deployment target is 10.9 or later. We will need to bump this to 10.13 at some point, but for now the easiest thing to do is to add a runtime check for 10.13 or later.
/Users/kcr/java/lanai/open/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLLayer.m:100:14: warning: 'setDisplaySyncEnabled:' is only available on macOS 10.13 or newer [-Wunguarded-availability-new]
self.displaySyncEnabled = NO;
^~~~~~~~~~~~~~~~~~
/var/tmp/jib-kcr/install/jpg/infra/builddeps/devkit-macosx_x64/Xcode10.1-MacOSX10.14+1.0/devkit-macosx_x64-Xcode10.1-MacOSX10.14+1.0.tar.gz/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h:116:16: note: 'setDisplaySyncEnabled:' has been explicitly marked partial here
@property BOOL displaySyncEnabled API_AVAILABLE(macos(10.13));
^
This fails the build unless you specify `--disable-warnings-as-errors` since the current deployment target is 10.9 or later. We will need to bump this to 10.13 at some point, but for now the easiest thing to do is to add a runtime check for 10.13 or later.
- relates to
-
JDK-8232164 Lock renderqueue for least amount of time by making CAMetalLayer asynchronous
- Resolved