Skip to content

Commit

Permalink
build: always pass -arch on macOS (#1325)
Browse files Browse the repository at this point in the history
Use the arch derived from -dumpmachine if none was specified to make.
Passing -arch seems to be required to get full debug information on
arm64.
  • Loading branch information
invertego authored Dec 4, 2023
1 parent 9b5e339 commit e176d8b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions nall/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ else
flags.deps = -MMD -MP -MF $(@:.o=.d)
endif
# architecture detection
ifeq ($(arch),)
ifneq ($(machine),)
arch := $(machine)
else
$(error unknown arch, please specify manually.)
endif
endif
# explicit architecture flags to allow for cross-compilation on macos
ifeq ($(platform),macos)
ifeq ($(arch),amd64)
Expand All @@ -143,15 +152,6 @@ ifeq ($(platform),macos)
endif
endif
# architecture detection
ifeq ($(arch),)
ifneq ($(machine),)
arch := $(machine)
else
$(error unknown arch, please specify manually.)
endif
endif
# build optimization levels
ifeq ($(build),debug)
symbols = true
Expand Down

0 comments on commit e176d8b

Please sign in to comment.