Skip to content

Commit 87d6f4c

Browse files
authored
Some tweaks to speed up building (#607)
* Allow configuring -O level with EDGEDB_OPT_CFLAG * Add a probably broken Makefile rule that skips the touches
1 parent dff941e commit 87d6f4c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ compile: _touch
3636
$(PYTHON) setup.py build_ext --inplace
3737

3838

39+
compile-fast:
40+
rm -fr $(ROOT)/gel/datatypes/datatypes.c
41+
rm -fr $(ROOT)/gel/protocol/protocol.c
42+
$(PYTHON) setup.py build_ext --inplace
43+
44+
3945
gen-errors:
4046
edb gen-errors --import "$(echo "from edgedb.errors._base import *"; echo "from edgedb.errors.tags import *")" \
4147
--extra-all "_base.__all__" --stdout --client > $(ROOT)/.errors

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@
3838

3939
CYTHON_DEPENDENCY = "Cython(>=3.0.11,<3.1.0)"
4040

41-
CFLAGS = ["-O2"]
41+
if flag := os.environ.get('EDGEDB_OPT_CFLAG'):
42+
CFLAGS = [flag]
43+
else:
44+
CFLAGS = ["-O2"]
4245
SYSTEM = sys.platform
4346

4447
if SYSTEM != "win32":

0 commit comments

Comments
 (0)