Skip to content

Commit e0da7a7

Browse files
committed
Jamfile: Optimize build output size
The goal here is to keep builds reasonably fast for development. Some time hopefully we'll have the ability to specify whether to build a debug or release build. But for now, we're stuck with trying to optimize both build time and build size simultaneously. Coolcoder613eb proposed four build flags to add. I tested them for their effect on build time and size.
1 parent eab0d76 commit e0da7a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Jamfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ SubDirHdrs /system/lib/python$(python_version)/vendor-packages/pybind11/include/
8282
SubDirHdrs /system/develop/headers/python$(python_version)/ ;
8383

8484
# Additional C++ flags to use when compiling
85-
SubDirC++Flags -std=c++14 -pipe -fPIC ;
85+
# TODO: only run -Os for release builds. Development builds should prioritize
86+
# build time
87+
SubDirC++Flags -std=c++14 -pipe -fPIC -Os -fvisibility=hidden ;
8688

8789
# Flags to use when linking
8890
LINKLIBS = -lbe ;

0 commit comments

Comments
 (0)