summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2013-07-10 11:41:53 +0100
committerBen Murdoch <benm@google.com>2013-07-10 11:41:53 +0100
commit0492546d926b86a28b97c7c59d5d9b3cdaf67988 (patch)
treeccdc315b743cae9e13ca276c1984f08f6fdca8d5
parentb5b03aa9eb5f82bc59bd7d3e140fc4d360b5f56d (diff)
parent13f6617652072d051fd7a273072217f34c26d145 (diff)
downloadfreetype-0492546d926b86a28b97c7c59d5d9b3cdaf67988.tar.gz
Merge from Chromium at DEPS revision r210036
This commit was generated by merge_to_master.py. Change-Id: I8a60a6cc4ebd04bcb6c2ed57de09fa0f8fe65ae5
-rw-r--r--ft2.target.darwin-arm.mk120
-rw-r--r--ft2.target.darwin-mips.mk117
-rw-r--r--ft2.target.darwin-x86.mk121
-rw-r--r--ft2.target.linux-arm.mk120
-rw-r--r--ft2.target.linux-mips.mk117
-rw-r--r--ft2.target.linux-x86.mk121
6 files changed, 662 insertions, 54 deletions
diff --git a/ft2.target.darwin-arm.mk b/ft2.target.darwin-arm.mk
index 51d39f1..8c2f691 100644
--- a/ft2.target.darwin-arm.mk
+++ b/ft2.target.darwin-arm.mk
@@ -45,7 +45,7 @@ LOCAL_SRC_FILES := \
# Flags passed to both C and C++ files.
-MY_CFLAGS := \
+MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-fno-exceptions \
@@ -80,9 +80,7 @@ MY_CFLAGS := \
-fdata-sections \
-ffunction-sections
-MY_CFLAGS_C :=
-
-MY_DEFS := \
+MY_DEFS_Debug := \
'-DANGLE_DX11' \
'-D_FILE_OFFSET_BITS=64' \
'-DUSE_LINUX_BREAKPAD' \
@@ -106,20 +104,18 @@ MY_DEFS := \
'-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
'-D_DEBUG'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
+LOCAL_C_INCLUDES_Debug := \
$(LOCAL_PATH)/third_party/freetype/build \
$(LOCAL_PATH)/third_party/freetype/include \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES)
# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS := \
+LOCAL_CPPFLAGS_Debug := \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -130,9 +126,96 @@ LOCAL_CPPFLAGS := \
-Wno-sign-promo \
-Wno-non-virtual-dtor
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-format \
+ -fno-tree-sra \
+ -fuse-ld=gold \
+ -Wno-psabi \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer
+
+MY_DEFS_Release := \
+ '-DANGLE_DX11' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DUSE_LINUX_BREAKPAD' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_GPU=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DENABLE_LANGUAGE_DETECTION=1' \
+ '-DFT2_BUILD_LIBRARY' \
+ '-DDARWIN_NO_CARBON' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH)/third_party/freetype/build \
+ $(LOCAL_PATH)/third_party/freetype/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-abi \
+ -Wno-error=c++0x-compat \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
### Rules for final target.
-LOCAL_LDFLAGS := \
+LOCAL_LDFLAGS_Debug := \
-Wl,-z,now \
-Wl,-z,relro \
-Wl,-z,noexecstack \
@@ -149,6 +232,25 @@ LOCAL_LDFLAGS := \
-Wl,--as-needed
+LOCAL_LDFLAGS_Release := \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -Wl,-z,relro \
+ -Wl,-z,now \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--icf=safe \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
LOCAL_STATIC_LIBRARIES :=
# Enable grouping to fix circular references
diff --git a/ft2.target.darwin-mips.mk b/ft2.target.darwin-mips.mk
index 805cfd7..162b9c1 100644
--- a/ft2.target.darwin-mips.mk
+++ b/ft2.target.darwin-mips.mk
@@ -45,7 +45,7 @@ LOCAL_SRC_FILES := \
# Flags passed to both C and C++ files.
-MY_CFLAGS := \
+MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
@@ -80,9 +80,7 @@ MY_CFLAGS := \
-fdata-sections \
-ffunction-sections
-MY_CFLAGS_C :=
-
-MY_DEFS := \
+MY_DEFS_Debug := \
'-DANGLE_DX11' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
@@ -105,20 +103,100 @@ MY_DEFS := \
'-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
'-D_DEBUG'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH)/third_party/freetype/build \
+ $(LOCAL_PATH)/third_party/freetype/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-uninitialized \
+ -Wno-error=c++0x-compat \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-format \
+ -EL \
+ -mhard-float \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer
+
+MY_DEFS_Release := \
+ '-DANGLE_DX11' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_GPU=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DENABLE_LANGUAGE_DETECTION=1' \
+ '-DFT2_BUILD_LIBRARY' \
+ '-DDARWIN_NO_CARBON' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
$(LOCAL_PATH)/third_party/freetype/build \
$(LOCAL_PATH)/third_party/freetype/include \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES)
# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS := \
+LOCAL_CPPFLAGS_Release := \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -129,9 +207,13 @@ LOCAL_CPPFLAGS := \
-Wno-sign-promo \
-Wno-non-virtual-dtor
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
### Rules for final target.
-LOCAL_LDFLAGS := \
+LOCAL_LDFLAGS_Debug := \
-Wl,-z,now \
-Wl,-z,relro \
-Wl,-z,noexecstack \
@@ -146,6 +228,23 @@ LOCAL_LDFLAGS := \
-Wl,--as-needed
+LOCAL_LDFLAGS_Release := \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -EL \
+ -Wl,--no-keep-memory \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
LOCAL_STATIC_LIBRARIES :=
# Enable grouping to fix circular references
diff --git a/ft2.target.darwin-x86.mk b/ft2.target.darwin-x86.mk
index 79d3c56..c5cea49 100644
--- a/ft2.target.darwin-x86.mk
+++ b/ft2.target.darwin-x86.mk
@@ -45,7 +45,7 @@ LOCAL_SRC_FILES := \
# Flags passed to both C and C++ files.
-MY_CFLAGS := \
+MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-fno-exceptions \
-fno-strict-aliasing \
@@ -82,9 +82,7 @@ MY_CFLAGS := \
-fdata-sections \
-ffunction-sections
-MY_CFLAGS_C :=
-
-MY_DEFS := \
+MY_DEFS_Debug := \
'-DANGLE_DX11' \
'-D_FILE_OFFSET_BITS=64' \
'-DUSE_LINUX_BREAKPAD' \
@@ -108,20 +106,18 @@ MY_DEFS := \
'-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
'-D_DEBUG'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
+LOCAL_C_INCLUDES_Debug := \
$(LOCAL_PATH)/third_party/freetype/build \
$(LOCAL_PATH)/third_party/freetype/include \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES)
# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS := \
+LOCAL_CPPFLAGS_Debug := \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -131,9 +127,99 @@ LOCAL_CPPFLAGS := \
-Wno-sign-promo \
-Wno-non-virtual-dtor
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-format \
+ -m32 \
+ -mmmx \
+ -march=pentium4 \
+ -msse2 \
+ -mfpmath=sse \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -fno-unwind-tables \
+ -fno-asynchronous-unwind-tables
+
+MY_DEFS_Release := \
+ '-DANGLE_DX11' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DUSE_LINUX_BREAKPAD' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_GPU=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DENABLE_LANGUAGE_DETECTION=1' \
+ '-DFT2_BUILD_LIBRARY' \
+ '-DDARWIN_NO_CARBON' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH)/third_party/freetype/build \
+ $(LOCAL_PATH)/third_party/freetype/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-error=c++0x-compat \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
### Rules for final target.
-LOCAL_LDFLAGS := \
+LOCAL_LDFLAGS_Debug := \
-Wl,-z,now \
-Wl,-z,relro \
-Wl,-z,noexecstack \
@@ -148,6 +234,23 @@ LOCAL_LDFLAGS := \
-Wl,--as-needed
+LOCAL_LDFLAGS_Release := \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m32 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
LOCAL_STATIC_LIBRARIES :=
# Enable grouping to fix circular references
diff --git a/ft2.target.linux-arm.mk b/ft2.target.linux-arm.mk
index 51d39f1..8c2f691 100644
--- a/ft2.target.linux-arm.mk
+++ b/ft2.target.linux-arm.mk
@@ -45,7 +45,7 @@ LOCAL_SRC_FILES := \
# Flags passed to both C and C++ files.
-MY_CFLAGS := \
+MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
-fno-exceptions \
@@ -80,9 +80,7 @@ MY_CFLAGS := \
-fdata-sections \
-ffunction-sections
-MY_CFLAGS_C :=
-
-MY_DEFS := \
+MY_DEFS_Debug := \
'-DANGLE_DX11' \
'-D_FILE_OFFSET_BITS=64' \
'-DUSE_LINUX_BREAKPAD' \
@@ -106,20 +104,18 @@ MY_DEFS := \
'-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
'-D_DEBUG'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
+LOCAL_C_INCLUDES_Debug := \
$(LOCAL_PATH)/third_party/freetype/build \
$(LOCAL_PATH)/third_party/freetype/include \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES)
# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS := \
+LOCAL_CPPFLAGS_Debug := \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -130,9 +126,96 @@ LOCAL_CPPFLAGS := \
-Wno-sign-promo \
-Wno-non-virtual-dtor
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-format \
+ -fno-tree-sra \
+ -fuse-ld=gold \
+ -Wno-psabi \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer
+
+MY_DEFS_Release := \
+ '-DANGLE_DX11' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DUSE_LINUX_BREAKPAD' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_GPU=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DENABLE_LANGUAGE_DETECTION=1' \
+ '-DFT2_BUILD_LIBRARY' \
+ '-DDARWIN_NO_CARBON' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH)/third_party/freetype/build \
+ $(LOCAL_PATH)/third_party/freetype/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-abi \
+ -Wno-error=c++0x-compat \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
### Rules for final target.
-LOCAL_LDFLAGS := \
+LOCAL_LDFLAGS_Debug := \
-Wl,-z,now \
-Wl,-z,relro \
-Wl,-z,noexecstack \
@@ -149,6 +232,25 @@ LOCAL_LDFLAGS := \
-Wl,--as-needed
+LOCAL_LDFLAGS_Release := \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -Wl,-z,relro \
+ -Wl,-z,now \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,--icf=safe \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
LOCAL_STATIC_LIBRARIES :=
# Enable grouping to fix circular references
diff --git a/ft2.target.linux-mips.mk b/ft2.target.linux-mips.mk
index 805cfd7..162b9c1 100644
--- a/ft2.target.linux-mips.mk
+++ b/ft2.target.linux-mips.mk
@@ -45,7 +45,7 @@ LOCAL_SRC_FILES := \
# Flags passed to both C and C++ files.
-MY_CFLAGS := \
+MY_CFLAGS_Debug := \
-fstack-protector \
--param=ssp-buffer-size=4 \
\
@@ -80,9 +80,7 @@ MY_CFLAGS := \
-fdata-sections \
-ffunction-sections
-MY_CFLAGS_C :=
-
-MY_DEFS := \
+MY_DEFS_Debug := \
'-DANGLE_DX11' \
'-D_FILE_OFFSET_BITS=64' \
'-DNO_TCMALLOC' \
@@ -105,20 +103,100 @@ MY_DEFS := \
'-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
'-D_DEBUG'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
+LOCAL_C_INCLUDES_Debug := \
+ $(LOCAL_PATH)/third_party/freetype/build \
+ $(LOCAL_PATH)/third_party/freetype/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Debug := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-uninitialized \
+ -Wno-error=c++0x-compat \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ -fstack-protector \
+ --param=ssp-buffer-size=4 \
+ \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-format \
+ -EL \
+ -mhard-float \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fstack-protector \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer
+
+MY_DEFS_Release := \
+ '-DANGLE_DX11' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_GPU=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DENABLE_LANGUAGE_DETECTION=1' \
+ '-DFT2_BUILD_LIBRARY' \
+ '-DDARWIN_NO_CARBON' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
$(LOCAL_PATH)/third_party/freetype/build \
$(LOCAL_PATH)/third_party/freetype/include \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES)
# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS := \
+LOCAL_CPPFLAGS_Release := \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -129,9 +207,13 @@ LOCAL_CPPFLAGS := \
-Wno-sign-promo \
-Wno-non-virtual-dtor
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
### Rules for final target.
-LOCAL_LDFLAGS := \
+LOCAL_LDFLAGS_Debug := \
-Wl,-z,now \
-Wl,-z,relro \
-Wl,-z,noexecstack \
@@ -146,6 +228,23 @@ LOCAL_LDFLAGS := \
-Wl,--as-needed
+LOCAL_LDFLAGS_Release := \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -EL \
+ -Wl,--no-keep-memory \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
LOCAL_STATIC_LIBRARIES :=
# Enable grouping to fix circular references
diff --git a/ft2.target.linux-x86.mk b/ft2.target.linux-x86.mk
index 79d3c56..c5cea49 100644
--- a/ft2.target.linux-x86.mk
+++ b/ft2.target.linux-x86.mk
@@ -45,7 +45,7 @@ LOCAL_SRC_FILES := \
# Flags passed to both C and C++ files.
-MY_CFLAGS := \
+MY_CFLAGS_Debug := \
--param=ssp-buffer-size=4 \
-fno-exceptions \
-fno-strict-aliasing \
@@ -82,9 +82,7 @@ MY_CFLAGS := \
-fdata-sections \
-ffunction-sections
-MY_CFLAGS_C :=
-
-MY_DEFS := \
+MY_DEFS_Debug := \
'-DANGLE_DX11' \
'-D_FILE_OFFSET_BITS=64' \
'-DUSE_LINUX_BREAKPAD' \
@@ -108,20 +106,18 @@ MY_DEFS := \
'-DWTF_USE_DYNAMIC_ANNOTATIONS=1' \
'-D_DEBUG'
-LOCAL_CFLAGS := $(MY_CFLAGS_C) $(MY_CFLAGS) $(MY_DEFS)
# Include paths placed before CFLAGS/CPPFLAGS
-LOCAL_C_INCLUDES := \
+LOCAL_C_INCLUDES_Debug := \
$(LOCAL_PATH)/third_party/freetype/build \
$(LOCAL_PATH)/third_party/freetype/include \
$(PWD)/frameworks/wilhelm/include \
$(PWD)/bionic \
$(PWD)/external/stlport/stlport
-LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES)
# Flags passed to only C++ (and not C) files.
-LOCAL_CPPFLAGS := \
+LOCAL_CPPFLAGS_Debug := \
-fno-rtti \
-fno-threadsafe-statics \
-fvisibility-inlines-hidden \
@@ -131,9 +127,99 @@ LOCAL_CPPFLAGS := \
-Wno-sign-promo \
-Wno-non-virtual-dtor
+
+# Flags passed to both C and C++ files.
+MY_CFLAGS_Release := \
+ --param=ssp-buffer-size=4 \
+ -fno-exceptions \
+ -fno-strict-aliasing \
+ -Wno-unused-parameter \
+ -Wno-missing-field-initializers \
+ -fvisibility=hidden \
+ -pipe \
+ -fPIC \
+ -Wno-format \
+ -m32 \
+ -mmmx \
+ -march=pentium4 \
+ -msse2 \
+ -mfpmath=sse \
+ -fuse-ld=gold \
+ -ffunction-sections \
+ -funwind-tables \
+ -g \
+ -fno-short-enums \
+ -finline-limit=64 \
+ -Wa,--noexecstack \
+ -U_FORTIFY_SOURCE \
+ -Wno-extra \
+ -Wno-ignored-qualifiers \
+ -Wno-type-limits \
+ -Wno-address \
+ -Wno-format-security \
+ -Wno-return-type \
+ -Wno-sequence-point \
+ -fno-stack-protector \
+ -Os \
+ -fno-ident \
+ -fdata-sections \
+ -ffunction-sections \
+ -fomit-frame-pointer \
+ -fno-unwind-tables \
+ -fno-asynchronous-unwind-tables
+
+MY_DEFS_Release := \
+ '-DANGLE_DX11' \
+ '-D_FILE_OFFSET_BITS=64' \
+ '-DUSE_LINUX_BREAKPAD' \
+ '-DNO_TCMALLOC' \
+ '-DDISABLE_NACL' \
+ '-DCHROMIUM_BUILD' \
+ '-DUSE_LIBJPEG_TURBO=1' \
+ '-DUSE_PROPRIETARY_CODECS' \
+ '-DENABLE_GPU=1' \
+ '-DUSE_OPENSSL=1' \
+ '-DENABLE_EGLIMAGE=1' \
+ '-DENABLE_LANGUAGE_DETECTION=1' \
+ '-DFT2_BUILD_LIBRARY' \
+ '-DDARWIN_NO_CARBON' \
+ '-DANDROID' \
+ '-D__GNU_SOURCE=1' \
+ '-DUSE_STLPORT=1' \
+ '-D_STLP_USE_PTR_SPECIALIZATIONS=1' \
+ '-DCHROME_BUILD_ID=""' \
+ '-DNDEBUG' \
+ '-DNVALGRIND' \
+ '-DDYNAMIC_ANNOTATIONS_ENABLED=0'
+
+
+# Include paths placed before CFLAGS/CPPFLAGS
+LOCAL_C_INCLUDES_Release := \
+ $(LOCAL_PATH)/third_party/freetype/build \
+ $(LOCAL_PATH)/third_party/freetype/include \
+ $(PWD)/frameworks/wilhelm/include \
+ $(PWD)/bionic \
+ $(PWD)/external/stlport/stlport
+
+
+# Flags passed to only C++ (and not C) files.
+LOCAL_CPPFLAGS_Release := \
+ -fno-rtti \
+ -fno-threadsafe-statics \
+ -fvisibility-inlines-hidden \
+ -Wno-deprecated \
+ -Wno-error=c++0x-compat \
+ -Wno-non-virtual-dtor \
+ -Wno-sign-promo \
+ -Wno-non-virtual-dtor
+
+
+LOCAL_CFLAGS := $(MY_CFLAGS_$(GYP_CONFIGURATION)) $(MY_DEFS_$(GYP_CONFIGURATION))
+LOCAL_C_INCLUDES := $(GYP_COPIED_SOURCE_ORIGIN_DIRS) $(LOCAL_C_INCLUDES_$(GYP_CONFIGURATION))
+LOCAL_CPPFLAGS := $(LOCAL_CPPFLAGS_$(GYP_CONFIGURATION))
### Rules for final target.
-LOCAL_LDFLAGS := \
+LOCAL_LDFLAGS_Debug := \
-Wl,-z,now \
-Wl,-z,relro \
-Wl,-z,noexecstack \
@@ -148,6 +234,23 @@ LOCAL_LDFLAGS := \
-Wl,--as-needed
+LOCAL_LDFLAGS_Release := \
+ -Wl,-z,now \
+ -Wl,-z,relro \
+ -Wl,-z,noexecstack \
+ -fPIC \
+ -m32 \
+ -fuse-ld=gold \
+ -nostdlib \
+ -Wl,--no-undefined \
+ -Wl,--exclude-libs=ALL \
+ -Wl,-O1 \
+ -Wl,--as-needed \
+ -Wl,--gc-sections
+
+
+LOCAL_LDFLAGS := $(LOCAL_LDFLAGS_$(GYP_CONFIGURATION))
+
LOCAL_STATIC_LIBRARIES :=
# Enable grouping to fix circular references