Skip to content

Commit

Permalink
Remove unsafeFlags
Browse files Browse the repository at this point in the history
  • Loading branch information
STREGA committed Oct 4, 2023
1 parent 6fff322 commit 663ca55
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ let package = Package(
])
#endif

#if true // Options for development of GateEngine. These should be disabled for tagged version releases.
#if false // Options for development of GateEngine. These should be disabled for tagged version releases.
#warning("GateEngine development options are enabled. These can cause strange build errors on some platforms.")

// Options for development of WASI platform
Expand Down Expand Up @@ -242,15 +242,13 @@ let package = Package(
path: "Dependencies/Vorbis",
publicHeadersPath: "include",
cSettings: [
// .unsafeFlags(["-Wno-everything"]),
.define("extern", to: "__declspec(dllexport) extern", .when(platforms: [.windows]))
]),

// miniz
.target(name: "MiniZ",
path: "Dependencies/MiniZ",
cSettings: [
// .unsafeFlags(["-Wno-everything"]),
.define("_CRT_SECURE_NO_WARNINGS", .when(platforms: [.windows])),
]),

Expand All @@ -259,7 +257,6 @@ let package = Package(
dependencies: ["MiniZ"],
path: "Dependencies/LibSPNG",
cSettings: [
// .unsafeFlags(["-Wno-everything"]),
.define("SPNG_STATIC"),
.define("SPNG_USE_MINIZ"),
// When public, the miniz.h header crashes Clang on Windows since Swift 5.8.0
Expand All @@ -271,7 +268,6 @@ let package = Package(
.target(name: "TrueType",
path: "Dependencies/TrueType",
cSettings: [
// .unsafeFlags(["-Wno-everything"]),
.define("STB_TRUETYPE_IMPLEMENTATION"), .define("STB_RECT_PACK_IMPLEMENTATION"),
.define("extern", to: "__declspec(dllexport) extern", .when(platforms: [.windows])),
.define("_CRT_SECURE_NO_WARNINGS", .when(platforms: [.windows])), // Silence warnings
Expand All @@ -284,9 +280,6 @@ let package = Package(
.define("BUILD_GRAVITY_API"),
// WASI doesn't have umask
.define("umask(x)", to: "022", .when(platforms: [.wasi])),
// Windows doesn't support PIC flag
// .unsafeFlags(["-fPIC"], .when(platforms: .any(except: .windows))),
// .unsafeFlags(["-Wno-everything"]),
.define("_CRT_SECURE_NO_WARNINGS", .when(platforms: [.windows])),
], linkerSettings: [
// For math functions
Expand All @@ -297,10 +290,7 @@ let package = Package(

// uFBX
.target(name: "uFBX",
path: "Dependencies/uFBX",
cSettings: [
// .unsafeFlags(["-Wno-everything"]),
]),
path: "Dependencies/uFBX"),
])

#if os(Windows)
Expand Down Expand Up @@ -461,9 +451,7 @@ var openALCSettings: [CSetting] {
array.append(.define("ALC_API", to: "__declspec(dllexport)", .when(platforms: [.windows])))
array.append(.define("AL_API", to: "__declspec(dllexport)", .when(platforms: [.windows])))
array.append(.define("_WIN32", .when(platforms: [.windows])))

// array.append(.unsafeFlags(["-Wno-everything"]))


return array
}

Expand Down

0 comments on commit 663ca55

Please sign in to comment.