From 1d214b20e44d5aff0b3d7ae321975af64eecb926 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sun, 5 Apr 2026 13:02:01 +0200 Subject: [PATCH] Fix compiler warnings on macOS --- .../Platforms/Mac/Binaries/ThirdParty/ARM64/libastcenc.a | 4 ++-- Source/ThirdParty/tracy/common/TracySystem.cpp | 5 +++++ Source/Tools/Flax.Build/Deps/Dependencies/astc.cs | 7 +++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libastcenc.a b/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libastcenc.a index 7d5b9c24c..25fa41e4f 100644 --- a/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libastcenc.a +++ b/Source/Platforms/Mac/Binaries/ThirdParty/ARM64/libastcenc.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:43c102505dd86c26284896d3cb63f15feeec2f48b554a8b7e2b6dea7c0742e75 -size 2025552 +oid sha256:a524bf38a9d61390369cd841cd334a3506a6027a062eb90245e42f8bbd3cfe03 +size 1737440 diff --git a/Source/ThirdParty/tracy/common/TracySystem.cpp b/Source/ThirdParty/tracy/common/TracySystem.cpp index 78cce7bdf..ec52b0e8c 100644 --- a/Source/ThirdParty/tracy/common/TracySystem.cpp +++ b/Source/ThirdParty/tracy/common/TracySystem.cpp @@ -58,6 +58,11 @@ extern "C" typedef HRESULT (WINAPI *t_GetThreadDescription)( HANDLE, PWSTR* ); #endif #endif +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + namespace tracy { diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/astc.cs b/Source/Tools/Flax.Build/Deps/Dependencies/astc.cs index 62a2b1097..0fbd8708f 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/astc.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/astc.cs @@ -66,6 +66,9 @@ namespace Flax.Deps.Dependencies var commit = "aeece2f609db959d1c5e43e4f00bd177ea130575"; // 4.6.1 CloneGitRepo(root, "https://github.com/ARM-software/astc-encoder.git", commit); + // Fix compilation on macOS + Utilities.ReplaceInFile(Path.Combine(root, "Source/cmake_core.cmake"), "-ffp-model=precise", ""); + foreach (var platform in options.Platforms) { foreach (var architecture in options.Architectures) @@ -84,14 +87,14 @@ namespace Flax.Deps.Dependencies var depsFolder = GetThirdPartyFolder(options, platform, architecture); Utilities.FileCopy(Path.Combine(buildDir, "Source/Release", lib), Path.Combine(depsFolder, "astcenc.lib")); break; - } + } case TargetPlatform.Mac: { string buildDir = Path.Combine(root, "build-" + architecture); var isa = architecture == TargetArchitecture.ARM64 ? "-DASTCENC_ISA_NEON=ON" : "-DASTCENC_ISA_SSE2=ON"; var lib = architecture == TargetArchitecture.ARM64 ? "libastcenc-neon-static.a" : "libastcenc-sse2-static.a"; SetupDirectory(buildDir, true); - RunCmake(buildDir, platform, architecture, ".. -DCMAKE_BUILD_TYPE=Release -DASTCENC_UNIVERSAL_BUILD=OFF -DASTCENC_UNIVERSAL_BINARY=OFF " + isa); + RunCmake(buildDir, platform, architecture, ".. -DCMAKE_BUILD_TYPE=Release -DASTCENC_UNIVERSAL_BUILD=OFF -DASTCENC_UNIVERSAL_BINARY=OFF -DASTCENC_INVARIANCE=OFF " + isa); BuildCmake(buildDir); var depsFolder = GetThirdPartyFolder(options, platform, architecture); Utilities.FileCopy(Path.Combine(buildDir, "Source", lib), Path.Combine(depsFolder, "libastcenc.a"));