Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / Makefile.shared
index 5dae818..a18547b 100644 (file)
@@ -24,6 +24,23 @@ ifneq (,$(ARCHS))
        else
                XCODE_OPTIONS := $(XCODE_OPTIONS) ARCHS="$(ARCHS)"
                XCODE_OPTIONS += ONLY_ACTIVE_ARCH=NO
+               # Make Plugin.32 and Plugin.64 build even when they can't be built for the specified architecture.
+               ifeq ($(ARCHS),i386)
+                       XCODE_OPTIONS += VALID_ARCHS=i386
+               endif
+               ifeq ($(ARCHS),x86_64)
+                       XCODE_OPTIONS += VALID_ARCHS=x86_64
+               endif
+       endif
+endif
+
+ifneq (,$(SDK_VARIANT))
+       XCODE_OPTIONS += SDK_VARIANT="$(SDK_VARIANT)"
+endif
+
+ifeq (, $(findstring WK_USE_CCACHE, $(ARGS)))
+       ifneq (, $(shell which ccache))
+               XCODE_OPTIONS += WK_USE_CCACHE=YES
        endif
 endif
 
@@ -31,7 +48,8 @@ DEFAULT_VERBOSITY := $(shell defaults read org.webkit.BuildConfiguration BuildTr
 VERBOSITY ?= $(DEFAULT_VERBOSITY)
 
 ifeq ($(VERBOSITY),default)
-OUTPUT_FILTER = grep -v setenv
+OUTPUT_FILTER = cat
+XCODE_OPTIONS += -hideShellScriptEnvironment
 else
 ifeq ($(VERBOSITY),noisy)
 OUTPUT_FILTER = cat
@@ -48,6 +66,14 @@ ASAN_OPTION=--no-asan
 endif
 endif
 
+ifeq ($(WK_LTO_MODE),full)
+WK_LTO_OPTION=--lto-mode=full
+else ifeq ($(WK_LTO_MODE),thin)
+WK_LTO_OPTION=--lto-mode=thin
+else ifeq ($(WK_LTO_MODE),none)
+WK_LTO_OPTION=--lto-mode=none
+endif
+
 export DSYMUTIL_NUM_THREADS = $(shell sysctl -n hw.activecpu)
 
 # Run xcodebuild with the same PATH with which the Xcode IDE runs, to mitigate unnecessary rebuilds due to PATH differences.
@@ -58,15 +84,15 @@ all: set_asan_configuration
        ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
 
 debug d development dev develop: force
-       $(SCRIPTS_PATH)/set-webkit-configuration --debug $(ASAN_OPTION)
+       $(SCRIPTS_PATH)/set-webkit-configuration --debug $(ASAN_OPTION) $(WK_LTO_OPTION)
        ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
 
 release r deployment dep deploy: force
-       $(SCRIPTS_PATH)/set-webkit-configuration --release $(ASAN_OPTION)
+       $(SCRIPTS_PATH)/set-webkit-configuration --release $(ASAN_OPTION) $(WK_LTO_OPTION)
        ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
 
 analyze:
-       $(SCRIPTS_PATH)/set-webkit-configuration --debug $(ASAN_OPTION)
+       $(SCRIPTS_PATH)/set-webkit-configuration --debug $(ASAN_OPTION) $(WK_LTO_OPTION)
 ifndef PATH_TO_SCAN_BUILD
        ( $(SET_COLOR_DIAGNOSTICS_ARG); xcodebuild $(OTHER_OPTIONS) $(XCODE_OPTIONS) RUN_CLANG_STATIC_ANALYZER=YES | $(OUTPUT_FILTER) && exit $${PIPESTATUS[0]} )
 else