Skip to content

Commit

Permalink
kram - fix config
Browse files Browse the repository at this point in the history
So many prop overrides that kill xcconfig, even at target level with empty string.  Hard to identify and fix.
  • Loading branch information
alecazam committed Oct 19, 2024
1 parent 6c3bea5 commit e1a1a6b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 41 deletions.
19 changes: 11 additions & 8 deletions build2/kram.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@
KRAM_FLAGS_X64 =
KRAM_FLAGS_X64[arch=x86_64] = -mf16c -mfma

KRAM_FLAGS_REL =
KRAM_FLAGS_REL[config=Release] = -NDEBUG=1
KRAM_FLAGS_RELEASE =
KRAM_FLAGS_RELEASE[config=Release] = -DNDEBUG=1

KRAM_FLAGS = -ftime-trace -DUSE_SIMDLIB=1
KRAM_FLAGS = -ftime-trace

// This is killing build times in Xcode16
ENABLE_MODULE_VERIFIER = NO
KRAM_FLAGS = $(KRAM_FLAGS) -DUSE_SIMDLIB=1 -DUSE_SIMDLIBMODULE=0

// EASTL, etc.
// KRAM_FLAGS += -DCOMPILE_EASTL=1
// TODO: also set include path for eastl

// configuring all the encoders in kram
// -DCOMPILE_ASTCENC=1 -DCOMPILE_ATE=1 -DCOMPILE_ETCENC=1 -DCOMPILE_SQUISH=1 -DCOMPILE_BCENC=1 -DCOMPILE_COMP=1 -DCOMPILE_BASIS=0 -DCOMPILE_EASTL=0 $(KRAM_FLAGS)
// KRAM_FLAGS += -DCOMPILE_ASTCENC=1 -DCOMPILE_ATE=1 -DCOMPILE_ETCENC=1 -DCOMPILE_SQUISH=1 -DCOMPILE_BCENC=1 -DCOMPILE_COMP=1 -DCOMPILE_BASIS=0 -DCOMPILE_EASTL=0

// This is killing build times in Xcode16
ENABLE_MODULE_VERIFIER = NO

OTHER_FLAGS = $(inherited) $(KRAM_FLAGS) $KRAM_FLAGS_REL) $(KRAM_FLAGS_X64)
OTHER_CFLAGS = $(inherited) $(KRAM_FLAGS) $(KRAM_FLAGS_RELEASE) $(KRAM_FLAGS_X64)
4 changes: 2 additions & 2 deletions build2/kram.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,7 @@
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"$(inherited)",
"-DCOMPILE_ASTCENC=1",
"-DCOMPILE_ATE=1",
"-DCOMPILE_ETCENC=1",
Expand All @@ -2374,7 +2375,6 @@
"-DCOMPILE_COMP=1",
"-DCOMPILE_BASIS=0",
"-DCOMPILE_EASTL=0",
"$(KRAM_FLAGS)",
);
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
SDKROOT = macosx;
Expand Down Expand Up @@ -2460,6 +2460,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CFLAGS = (
"$(inherited)",
"-DCOMPILE_ASTCENC=1",
"-DCOMPILE_ATE=1",
"-DCOMPILE_ETCENC=1",
Expand All @@ -2468,7 +2469,6 @@
"-DCOMPILE_COMP=1",
"-DCOMPILE_BASIS=0",
"-DCOMPILE_EASTL=0",
"$(KRAM_FLAGS)",
);
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
SDKROOT = macosx;
Expand Down
9 changes: 2 additions & 7 deletions build2/kramc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,9 @@
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-DCOMPILE_EASTL=0",
"$(inherited)",
"-include",
KramConfig.h,
"-mfma",
"-mf16c",
);
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
SDKROOT = macosx;
Expand Down Expand Up @@ -283,12 +281,9 @@
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CFLAGS = (
"-DNDEBUG=1",
"-DCOMPILE_EASTL=0",
"$(inherited)",
"-include",
KramConfig.h,
"-mfma",
"-mf16c",
);
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
SDKROOT = macosx;
Expand Down
7 changes: 2 additions & 5 deletions build2/kramv.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -600,10 +600,9 @@
MTL_LANGUAGE_REVISION = UseDeploymentTarget;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-DCOMPILE_EASTL=0",
"$(inherited)",
"-include",
KramConfig.h,
"-mfma",
);
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
Expand Down Expand Up @@ -677,11 +676,9 @@
MTL_FAST_MATH = YES;
MTL_LANGUAGE_REVISION = UseDeploymentTarget;
OTHER_CFLAGS = (
"-DNDEBUG=1",
"-DCOMPILE_EASTL=0",
"$(inherited)",
"-include",
KramConfig.h,
"-mfma",
);
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO;
Expand Down
8 changes: 0 additions & 8 deletions build2/vectormath.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@
/* Begin XCBuildConfiguration section */
701AF18F2CAD27CB00BD0886 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 707D4C522CC41F3900729BE0 /* kram.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
EXECUTABLE_PREFIX = lib;
Expand All @@ -358,7 +357,6 @@
};
701AF1902CAD27CB00BD0886 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 707D4C522CC41F3900729BE0 /* kram.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
EXECUTABLE_PREFIX = lib;
Expand Down Expand Up @@ -432,7 +430,6 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(KRAM_FLAGS)";
SDKROOT = macosx;
XROS_DEPLOYMENT_TARGET = 2.0;
};
Expand Down Expand Up @@ -495,15 +492,13 @@
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c c++";
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_CFLAGS = "$(KRAM_FLAGS)";
SDKROOT = macosx;
XROS_DEPLOYMENT_TARGET = 2.0;
};
name = Release;
};
70B686F92CAD1026007ACA58 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 707D4C522CC41F3900729BE0 /* kram.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
EXECUTABLE_PREFIX = lib;
Expand All @@ -514,7 +509,6 @@
};
70B686FA2CAD1026007ACA58 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 707D4C522CC41F3900729BE0 /* kram.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
EXECUTABLE_PREFIX = lib;
Expand All @@ -525,7 +519,6 @@
};
70E3BADC2CBCE81700F11926 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 707D4C522CC41F3900729BE0 /* kram.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
EXECUTABLE_PREFIX = lib;
Expand All @@ -537,7 +530,6 @@
};
70E3BADD2CBCE81700F11926 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 707D4C522CC41F3900729BE0 /* kram.xcconfig */;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
EXECUTABLE_PREFIX = lib;
Expand Down
23 changes: 12 additions & 11 deletions libkram/kram/KramConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,18 @@
//-------------------------
// simd

#if KRAM_APPLE
// can use old or new
#define USE_SIMDLIB 1

// maybe this doesn't work with C++ pch,
#define USE_SIMDLIBMODULE 0
#else
// have to use new on all other platforms
#define USE_SIMDLIB 1
#define USE_SIMDLIBMODULE 0
#endif
// This is now all in kram.xcconfig
//#if KRAM_APPLE
//// can use old or new
//#define USE_SIMDLIB 1
//
//// maybe this doesn't work with C++ pch,
//#define USE_SIMDLIBMODULE 0
//#else
//// have to use new on all other platforms
//#define USE_SIMDLIB 1
//#define USE_SIMDLIBMODULE 0
//#endif

#if USE_SIMDLIB

Expand Down

0 comments on commit e1a1a6b

Please sign in to comment.