[WHLSL] parseEffectfulAssignment should not call parseCallExpression directly
[WebKit-https.git] / Makefile.shared
index b318440..85f0cb7 100644 (file)
@@ -34,6 +34,26 @@ ifneq (,$(ARCHS))
        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
+
+ifeq ($(findstring UseNewBuildSystem,$(ARGS)),)
+       CAN_USE_XCBUILD = $(shell perl -I$(SCRIPTS_PATH) -Mwebkitdirs -e 'print canUseXCBuild()')
+       ifeq ($(CAN_USE_XCBUILD),1)
+               XCODE_OPTIONS += -UseNewBuildSystem=YES
+               XCODE_OPTIONS += USE_NEW_BUILD_SYSTEM=YES
+       else
+               XCODE_OPTIONS += -UseNewBuildSystem=NO
+       endif
+endif
+
 DEFAULT_VERBOSITY := $(shell defaults read org.webkit.BuildConfiguration BuildTranscriptVerbosity 2>/dev/null || echo "default")
 VERBOSITY ?= $(DEFAULT_VERBOSITY)
 
@@ -56,6 +76,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.
@@ -66,15 +94,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