File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed
Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 2020 OPENGRAPHICS_BUILD_FOR_DARWIN_PLATFORM : 1
2121 OPENGRAPHICS_WERROR : 1
2222 OPENGRAPHICS_COREGRAPHICS : 1
23+ OPENGRAPHICS_LIBRARY_EVOLUTION : 0
2324 GH_TOKEN : ${{ github.token }}
2425 steps :
2526 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1919 OPENGRAPHICS_BUILD_FOR_DARWIN_PLATFORM : 1
2020 OPENGRAPHICS_WERROR : 1
2121 OPENGRAPHICS_COREGRAPHICS : 0
22+ OPENGRAPHICS_LIBRARY_EVOLUTION : 0
2223 GH_TOKEN : ${{ github.token }}
2324 steps :
2425 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1818 OPENGRAPHICS_BUILD_FOR_DARWIN_PLATFORM : 0
1919 OPENGRAPHICS_WERROR : 1
2020 OPENGRAPHICS_COREGRAPHICS : 0
21+ OPENGRAPHICS_LIBRARY_EVOLUTION : 0
2122 container : swift:${{ matrix.swift_version }}-jammy
2223 steps :
2324 - uses : actions/checkout@v4
Original file line number Diff line number Diff line change @@ -31,16 +31,30 @@ let isXcodeEnv = Context.environment["__CFBundleIdentifier"] == "com.apple.dt.Xc
3131
3232let development = envEnable ( " OPENGRAPHICS_DEVELOPMENT " )
3333
34+ // MARK: - [env] OPENGRAPHICS_COREGRAPHICS
35+
3436let coreGraphicsCondition = envEnable ( " OPENGRAPHICS_COREGRAPHICS " , default: buildForDarwinPlatform)
3537if coreGraphicsCondition {
3638 sharedSwiftSettings. append ( . define( " OPENGRAPHICS_COREGRAPHICS " ) )
3739}
3840
41+ // MARK: - [env] OPENGRAPHICS_WERROR
42+
3943let warningsAsErrorsCondition = envEnable ( " OPENGRAPHICS_WERROR " , default: isXcodeEnv && development)
4044if warningsAsErrorsCondition {
4145 sharedSwiftSettings. append ( . unsafeFlags( [ " -warnings-as-errors " ] ) )
4246}
4347
48+ // MARK: - [env] OPENGRAPHICS_LIBRARY_EVOLUTION
49+
50+ let libraryEvolutionCondition = envEnable ( " OPENGRAPHICS_LIBRARY_EVOLUTION " , default: buildForDarwinPlatform)
51+
52+ if libraryEvolutionCondition {
53+ // NOTE: -enable-library-evolution will cause module verify failure for `swift build`.
54+ // Either set OPENGRAPHICS_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
55+ sharedSwiftSettings. append ( . unsafeFlags( [ " -enable-library-evolution " , " -no-verify-emitted-module-interface " ] ) )
56+ }
57+
4458let package = Package (
4559 name: " OpenGraphics " ,
4660 products: [
You can’t perform that action at this time.
0 commit comments