aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2019-05-28 14:42:38 +0200
committerDan Gudmundsson <[email protected]>2019-05-29 12:57:30 +0200
commita6a9a16dbf1ad5eb49b4f72a8073def5e0566485 (patch)
tree3d7e43e63c8e6585696e36de25ca36758347aa00 /lib/wx
parent0991c866f7420f2fc211404162e67b45f0174447 (diff)
downloadotp-a6a9a16dbf1ad5eb49b4f72a8073def5e0566485.tar.gz
otp-a6a9a16dbf1ad5eb49b4f72a8073def5e0566485.tar.bz2
otp-a6a9a16dbf1ad5eb49b4f72a8073def5e0566485.zip
Speed up compilation
Decreases compilation time without reducing performance.
Diffstat (limited to 'lib/wx')
-rw-r--r--lib/wx/c_src/Makefile.in15
-rw-r--r--lib/wx/configure.in19
2 files changed, 26 insertions, 8 deletions
diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
index 8ec64bea7e..daadf5e785 100644
--- a/lib/wx/c_src/Makefile.in
+++ b/lib/wx/c_src/Makefile.in
@@ -70,7 +70,7 @@ else
RC_FILE =
endif
-WX_OBJECTS = $(GENERAL_O) $(GENERATED_O) $(RC_FILE)
+WX_OBJECTS = $(GENERATED_O) $(GENERAL_O) $(RC_FILE)
OBJECTS = $(WX_OBJECTS) $(GL_OBJECTS)
@@ -86,7 +86,7 @@ LD = $(CXX)
LDFLAGS = @LDFLAGS@
RESCOMP = @WX_RESCOMP@
-ifeq (@WX_HAVE_STATIC_LIBS@,true)
+ifeq (@WX_HAVE_STATIC_LIBS@,true)
OPT_WX_LIBS = @WX_LIBS_STATIC@
DEBUG_WX_LIBS = @DEBUG_WX_LIBS_STATIC@
else
@@ -97,14 +97,16 @@ endif
ifeq ($(TYPE),debug)
WX_CFLAGS = @DEBUG_WX_CFLAGS@
CFLAGS = @DEBUG_CFLAGS@
-WX_CXX_FLAGS = @DEBUG_WX_CXXFLAGS@
+WX_CXX_FLAGS = @DEBUG_WX_CXXFLAGS@
CXX_FLAGS = @DEBUG_CXXFLAGS@
+CXX_NO_OPT_FLAGS = @DEBUG_CXXFLAGS@
WX_LIBS = $(DEBUG_WX_LIBS)
else
WX_CFLAGS = @WX_CFLAGS@
CFLAGS = @CFLAGS@
-WX_CXX_FLAGS = @WX_CXXFLAGS@
+WX_CXX_FLAGS = @WX_CXXFLAGS@
CXX_FLAGS = @CXXFLAGS@
+CXX_NO_OPT_FLAGS = @CXXNOOPTFLAGS@
WX_LIBS = $(OPT_WX_LIBS)
endif
@@ -113,6 +115,7 @@ GL_LIBS = @GL_LIBS@
CC_O = $(V_CC) -c $(CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS)
OBJC_CC_O = $(OBJC_CC) -c $(CFLAGS) $(OBJC_CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS)
CXX_O = $(V_CXX) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS)
+CXX_O_NO_OPT = $(V_CXX) -c $(CXX_NO_OPT_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS)
# Targets
@@ -152,6 +155,10 @@ $(SYS_TYPE)/wxe_ps_init.o: wxe_ps_init.c
$(V_at)mkdir -p $(SYS_TYPE)
$(cc_verbose)$(OBJC_CC_O) $< -o $@
+$(SYS_TYPE)/wxe_funcs.o: gen/wxe_funcs.cpp
+ $(V_at)mkdir -p $(SYS_TYPE)
+ $(CXX_O_NO_OPT) $< -o $@
+
$(SYS_TYPE)/%.o: gen/%.cpp
$(V_at)mkdir -p $(SYS_TYPE)
$(CXX_O) $< -o $@
diff --git a/lib/wx/configure.in b/lib/wx/configure.in
index 60f0a52ef3..f35e6cdbd0 100644
--- a/lib/wx/configure.in
+++ b/lib/wx/configure.in
@@ -229,11 +229,21 @@ case $host_os in
;;
*)
DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG"
- CFLAGS="-g -Wall -O2 -fPIC $CFLAGS -fomit-frame-pointer -fno-strict-aliasing"
+ CFLAGS="-Wall -fPIC $CFLAGS -fomit-frame-pointer -fno-strict-aliasing"
;;
esac
-dnl
+dnl
+dnl Use -O1 -fno-move-loop-invariants for wxe_funcs.cpp to reduce
+dnl compilation time
+dnl
+
+if test "x$GCC" = xyes -a X"$host_os" != X"win32" ; then
+ CXXNOOPT="-O1"
+ LM_TRY_ENABLE_CFLAG([-fno-move-loop-invariants], [CXXNOOPT])
+fi
+
+dnl
dnl Opengl tests
dnl
@@ -288,13 +298,13 @@ AC_SUBST(GL_LIBS)
DEBUG_CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS $CPPFLAGS"
DEBUG_CFLAGS="$DEBUG_CFLAGS $CPPFLAGS $C_ONLY_FLAGS"
-CXXFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS"
+CXXNOOPTFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS $CXXNOOPT"
+CXXFLAGS="$CXXFLAGS $CFLAGS $CPPFLAGS"
CFLAGS="$CFLAGS $CPPFLAGS $C_ONLY_FLAGS"
AC_SUBST(DEBUG_CFLAGS)
AC_SUBST(DEBUG_CXXFLAGS)
-
ERLC=erlc
ERL=erl
ERLANG_ROOT_DIR=$ERL_TOP
@@ -691,6 +701,7 @@ esac
AC_SUBST(SO_EXT)
AC_SUBST(RUN_ERL)
+AC_SUBST(CXXNOOPTFLAGS)
if test X"$WX_BUILDING_INSIDE_ERLSRC" != X"true" ; then