Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions procgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ endif()

if (APPLE OR UNIX)
if(PROCGEN_PACKAGE)
# compile for the minimum spec processor
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=ivybridge")
# compile for the minimum spec processor (for a portable wheel)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64|aarch64")
# -march=ivybridge is an x86-only microarch and is rejected by arm64 clang;
# use the base armv8-a ISA so the wheel stays portable across Apple Silicon / aarch64.
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=armv8-a")
else()
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=ivybridge")
endif()
else()
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=native")
endif()
Expand Down
6 changes: 5 additions & 1 deletion procgen/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ def _attempt_configure(build_type, package):
cmake_prefix_paths = [os.environ["PROCGEN_CMAKE_PREFIX_PATH"]]
else:
# guess some common qt cmake paths, it's unclear why cmake can't find qt without this
cmake_prefix_paths = ["/usr/local/opt/qt5/lib/cmake"]
# (Apple Silicon Homebrew installs qt@5 under /opt/homebrew; Intel Homebrew under /usr/local)
cmake_prefix_paths = [
"/usr/local/opt/qt5/lib/cmake",
"/opt/homebrew/opt/qt@5/lib/cmake",
]
conda_exe = shutil.which("conda")
if conda_exe is not None:
conda_info = json.loads(
Expand Down
2 changes: 1 addition & 1 deletion procgen/src/games/chaser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class ChaserGame : public BasicAbstractGame {
void game_step() override {
BasicAbstractGame::game_step();

int num_orbs = 0;
[[maybe_unused]] int num_orbs = 0;
int num_enemies = 0;

float default_enemy_speed = .5;
Expand Down
2 changes: 1 addition & 1 deletion procgen/src/games/starpilot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class StarPilotGame : public BasicAbstractGame {

bool can_spawn_left = options.distribution_mode != EasyMode;

for (int i = 0; t <= SHOOTER_WIN_TIME; i++) {
for ([[maybe_unused]] int i = 0; t <= SHOOTER_WIN_TIME; i++) {
int group_size = 1;
float start_weight = rand_gen.rand01() * total_prob_weight;
float curr_weight = start_weight;
Expand Down