diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-08-05 21:29:20 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-09-22 08:15:42 +0200 |
commit | ebe48dc2b1a3ab3df2457d4c2be7bd9cbe960c30 (patch) | |
tree | 2515eab15fd08587fa1c9a35baa11f3cf1184629 | |
parent | b03fd9b3a6ad31d0ca03c662da29cc70a21ca423 (diff) |
honour --enable-lto on windows too
Change-Id: I78637034d9fdd4a5528fe1e9c9bc752086954526
-rw-r--r-- | solenv/gbuild/platform/WNT_INTEL_MSC.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk index 4ce32955c537..265a1c3a0c92 100644 --- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk @@ -237,6 +237,8 @@ define gb_create_deps endef endif +gb_COMPILER_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL) + # Helper class gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/bin @@ -275,6 +277,7 @@ $(call gb_Helper_abbreviate_dirs,\ unset INCLUDE && \ $(gb_CC) \ $(DEFS) \ + $(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \ $(T_CFLAGS) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ -Fd$(PDBFILE) \ @@ -296,6 +299,7 @@ $(call gb_Helper_abbreviate_dirs,\ unset INCLUDE && \ $(if $(filter YES,$(CXXOBJECT_X64)), $(CXX_X64_BINARY), $(gb_CXX)) \ $(DEFS) \ + $(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \ $(T_CXXFLAGS) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \ -Fd$(PDBFILE) \ @@ -386,6 +390,10 @@ gb_Library_TARGETTYPEFLAGS := \ -DLL \ $(gb_Windows_PE_TARGETTYPEFLAGS) +ifeq ($(ENABLE_LTO),TRUE) +gb_Library_TARGETTYPEFLAGS += -LTCG +endif + gb_Library_get_rpath := gb_Library_SYSPRE := i |