changeset 2316:b66f5ff665cb

Reverted precomp flags order to restore precomp functionality on linux
author erikj
date Tue, 15 Mar 2016 12:06:00 +0100
parents f84403709ae3
children 46e6141fab17
files make/common/NativeCompilation.gmk
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/NativeCompilation.gmk	Fri Mar 11 15:56:28 2016 +0100
+++ b/make/common/NativeCompilation.gmk	Tue Mar 15 12:06:00 2016 +0100
@@ -228,17 +228,15 @@
 
   ifneq (,$$(filter %.c,$2))
     # Compile as a C file
-    $1_$2_FLAGS=$(CFLAGS_CCACHE) $4 \
+    $1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
         $$($1_$(notdir $2)_OPT_CFLAGS) \
-        $$($1_$2_USE_PCH_FLAGS) \
         $$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
     $1_$2_COMP=$5
     $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
   else ifneq (,$$(filter %.m,$2))
     # Compile as an Objective-C file
-    $1_$2_FLAGS=-x objective-c $(CFLAGS_CCACHE) $4 \
+    $1_$2_FLAGS=-x objective-c $(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $4 \
         $$($1_$(notdir $2)_OPT_CFLAGS) \
-        $$($1_$2_USE_PCH_FLAGS) \
         $$($1_$(notdir $2)_CFLAGS) $$($1_$2_THIS_FILE) -c
     $1_$2_COMP=$5
     $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
@@ -249,9 +247,8 @@
     $1_$2_DEP_FLAG:=
   else ifneq (,$$(filter %.cpp,$2)$$(filter %.cc,$2)$$(filter %.mm,$2))
     # Compile as a C++ or Objective-C++ file
-    $1_$2_FLAGS=$(CFLAGS_CCACHE) $6 \
+    $1_$2_FLAGS=$(CFLAGS_CCACHE) $$($1_$2_USE_PCH_FLAGS) $6 \
         $$($1_$(notdir $2)_OPT_CXXFLAGS) \
-        $$($1_$2_USE_PCH_FLAGS) \
         $$($1_$(notdir $2)_CXXFLAGS) $$($1_$2_THIS_FILE) -c
     $1_$2_COMP=$7
     $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
@@ -714,7 +711,8 @@
 		$$(call LogInfo, Generating precompiled header)
 		$$(call MakeDir, $$(@D))
 		$$(call ExecuteWithLog, $$@, \
-		    $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_OPT_CFLAGS) \
+		    $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \
+		    $$($1_OPT_CFLAGS) \
 		    -x c++-header -c $(C_FLAG_DEPS) $$($1_PCH_DEP) $$< -o $$@)
 		$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_PCH_DEP) > $$($1_PCH_DEP_TARGETS)