Skip to content

[build] fix various make issues#11486

Open
sorens wants to merge 6 commits into
simulationcraft:midnightfrom
sorens:skorens/make
Open

[build] fix various make issues#11486
sorens wants to merge 6 commits into
simulationcraft:midnightfrom
sorens:skorens/make

Conversation

@sorens
Copy link
Copy Markdown

@sorens sorens commented May 25, 2026

  • remove ancient workarounds
  • remove broken, not used flags
  • add variants that allow debug, release and optimized to coexist
  • fix warnings

i am interested in making the build process easier, deterministic, reproducible and useful (use correct flags, remove the bit rot). it seems the four targets are:

make
make debug
make release
make optimized

I left make untouched, no variant build (CI reasons).

i investigated the use of the fast-math optimization. there was no speed improvement observed in my testing (darwin, m5). there was a noticeable affect to determinism. if you still want to use fast-math, set $FFAST-MATH in your environment prior to building.

-flto did have a much greater impact on runtime performance, set $LTO in your environment. note: -flto, does not use the -O3 compiler optimization; likely you'll default to your linker's default optimization level (maybe -O2?). In my testing, forcing a -O3 linker optimization had no effect on simc performance.

i am using the latest macOS, Tahoe 26.5 on an M5 with the latest tools. If there are developers that need to use older platforms, please let me know. i made these changes with the goal of honoring as many existing platforms and versions as possible. if i made a choice that makes development more difficult for you, let me know and I can adjust.

there is always a solution.

follow-on: I forgot to check CI and there is drift from what CI is building to what I was working on in the engine Makefile. i'll look at that next. I guess the real fixes would be to align on cmake+ninja for every platform.

@sorens sorens changed the title fix various make issues [build] fix various make issues May 25, 2026
sorens added 6 commits May 26, 2026 11:39
remove this ancient logical branch pinning -mcpu=apple-m1 on darwin and all other os with -march=native.

-march and -mcpu had little effect on runtime performance.

set $MARCH and $MCPU as desired when building.
xcode 11 was a long time ago. plus, flag is for the link step, not the compile step so it was never being applied anyway.
debug, release and optimized can coexist in engine/build/
1. logical error when to use default_potion()
2. resolve the 'object backing the pointer ' warning for potion_view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant