Skip to content

Commit 5ce2654

Browse files
authored
Small cleanup (#37)
* Remove execeutable bit from error text files * Combine Release and Debug Make options into just Release * Add note about debug vs release builds in readme * Change debug builds to use -Og
1 parent 11cbe67 commit 5ce2654

File tree

5 files changed

+14
-16
lines changed

5 files changed

+14
-16
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
shell: bash
2828
if: matrix.os == 'ubuntu-20.04'
2929
run: |
30-
make -j $(nproc) RELEASE=1 DEBUG=0 setup
30+
make -j $(nproc) RELEASE=1 setup
3131
3232
- name: Run the build script (Ubuntu)
3333
shell: bash
3434
if: matrix.os == 'ubuntu-20.04'
3535
run: |
36-
make -j $(nproc) RELEASE=1 DEBUG=0 VERSION=${{ matrix.ido }}
36+
make -j $(nproc) RELEASE=1 VERSION=${{ matrix.ido }}
3737
3838
# MacOS
3939
- name: Install dependencies (MacOS)
@@ -46,12 +46,12 @@ jobs:
4646
shell: bash
4747
if: matrix.os == 'macos-latest'
4848
run: |
49-
make -j $(nproc) RELEASE=1 DEBUG=0 setup
49+
make -j $(nproc) RELEASE=1 setup
5050
- name: Run the build script (MacOS)
5151
shell: bash
5252
if: matrix.os == 'macos-latest'
5353
run: |
54-
make -j $(nproc) RELEASE=1 DEBUG=0 VERSION=${{ matrix.ido }} TARGET=universal
54+
make -j $(nproc) RELEASE=1 VERSION=${{ matrix.ido }} TARGET=universal
5555
5656
# Windows
5757
- name: Install dependencies (Windows)
@@ -67,14 +67,14 @@ jobs:
6767
shell: msys2 {0}
6868
if: matrix.os == 'windows-latest'
6969
run: |-
70-
make --jobs RELEASE=1 DEBUG=0 setup
70+
make --jobs RELEASE=1 setup
7171
7272
- name: Run the build script (Windows)
7373
shell: cmd
7474
if: matrix.os == 'windows-latest'
7575
run: |-
7676
set MSYSTEM=MSYS
77-
msys2 -c 'make --jobs RELEASE=1 DEBUG=0 VERSION=${{ matrix.ido }}'
77+
msys2 -c 'make --jobs RELEASE=1 VERSION=${{ matrix.ido }}'
7878
7979
# Archive
8080
- name: Create release archive

Makefile

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
VERSION ?= 7.1
1010
# if WERROR is 1, pass -Werror to CC, so warnings would be treated as errors
1111
WERROR ?= 0
12-
# if RELEASE is 1 symbols are stripped from the recomped binaries
12+
# if RELEASE is 1 strip binaries as well as enable optimizations
1313
RELEASE ?= 0
14-
# Disables/Enables optimizations to make debugging easier
15-
DEBUG ?= 1
1614
# On Mac, set this to `universal` to build universal (x86+ARM) binaries
1715
TARGET ?= native
1816
# Set to 1 to build with sanitization enabled
@@ -73,14 +71,11 @@ ifneq ($(WERROR),0)
7371
WARNINGS += -Werror
7472
endif
7573

76-
ifeq ($(RELEASE),0)
77-
STRIP := @:
78-
endif
79-
80-
ifeq ($(DEBUG),0)
74+
ifeq ($(RELEASE),1)
8175
OPTFLAGS ?= -Os
8276
else
83-
OPTFLAGS ?= -O0 -g3
77+
OPTFLAGS ?= -Og -g3
78+
STRIP := @:
8479
endif
8580

8681
ifneq ($(ASAN),0)
@@ -155,7 +150,7 @@ setup:
155150
clean:
156151
$(RM) -r $(BUILD_DIR)
157152

158-
distclean: clean
153+
distclean:
159154
$(RM) -r $(BUILD_BASE)
160155
$(MAKE) -C $(RABBITIZER) distclean
161156

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ make VERSION=7.1
4040

4141
The build artifacts are located in `build/{7.1|5.3}/out`. Add `-j{thread num}` for multithreaded building.
4242

43+
By default, debug builds are created with less optimizations, debug flags, and unstripped binaries.
44+
Add `RELEASE=1` to build release builds with optimizations and stripped binaries.
45+
4346
### Creating Universal ARM/x86_64 macOS Builds
4447

4548
By default, make build script create native binaries on macOS. This was done to minimize the time to build the recompiled suite.

ido/5.3/usr/lib/err.english.cc

100755100644
File mode changed.

ido/7.1/usr/lib/err.english.cc

100755100644
File mode changed.

0 commit comments

Comments
 (0)