summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@centrum.cz>2021-10-31 13:53:28 +0000
committerLuboš Luňák <l.lunak@collabora.com>2021-10-31 20:13:28 +0100
commitbc39f6b0e62b0a54500bf3986f971a43fe8f843d (patch)
treefdb2d5b7b7b045e5e782aef33f4dc89d24007247 /solenv
parent3eeb77ece8db11e6c57864c507af5d24253a6276 (diff)
fix usage of MSVC's -debug:fastlink
Using /link while only compiling does nothing (and MSVC apparently doesn't bother to warn). Fix gbuild to pass -debug:fastlink when linking, and limit it to dbgutil builds, since pdb files cannot be moved elsewhere if the option is used. Change-Id: I0325c55ddea1ce881b60b1373c81019d154ef672 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124526 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 0fff6a2caf20..1dffddb2599a 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -83,7 +83,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(INCLUDE) \
-Fd$(PDBFILE) \
-c $(3) \
- -Fo$(1)) $(if $(filter $(true),$(6)),/link /DEBUG:FASTLINK) \
+ -Fo$(1)) \
$(if $(COMPILER_TEST),,$(call gb_create_deps,$(4),$(1),$(3)))
endef
@@ -301,7 +301,12 @@ gb_Windows_PE_TARGETTYPEFLAGS := \
-manifest
# link.exe in -LIB mode doesn't understand -debug, use it only for EXEs and DLLs
+ifeq ($(gb_ENABLE_DBGUTIL),$(true))
+# fastlink is faster but pdb files reference .obj files
+gb_Windows_PE_TARGETTYPEFLAGS_DEBUGINFO := -debug:fastlink
+else
gb_Windows_PE_TARGETTYPEFLAGS_DEBUGINFO := -debug
+endif
ifeq ($(ENABLE_LTO),TRUE)
gb_Windows_PE_TARGETTYPEFLAGS += -LTCG