diff options
author | Michal Klocek <michal.klocek@qt.io> | 2020-07-20 15:56:14 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-07-23 15:13:08 +0200 |
commit | 74fe796039e85c97ffac3f7b014ca718e7284dea (patch) | |
tree | 2ae017494833c923bcf1489dd3dfa29bcb888d60 /src/core/core_module.pro | |
parent | 6178015dff6f2f83c16a1dddb199c7f6c3e9c694 (diff) |
Share linking config between webenginecore and pdf
Change-Id: Ib06a0a1ec3372d483008cc0ac0ec211ec8316e0e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/core_module.pro')
-rw-r--r-- | src/core/core_module.pro | 57 |
1 files changed, 4 insertions, 53 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 5007012ac..3b439e818 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -1,62 +1,10 @@ MODULE = webenginecore include(core_common.pri) -# Needed to set a CFBundleIdentifier -QMAKE_INFO_PLIST = Info_mac.plist - -linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri - -!include($$linking_pri) { - error("Could not find the linking information that gn should have generated.") -} +include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() api_library_path = $$OUT_PWD/api/$$getConfigDir() - -# Do not precompile any headers. We are only interested in the linker step. -PRECOMPILED_HEADER = - -isEmpty(NINJA_OBJECTS): error("Missing object files from QtWebEngineCore linking pri.") -isEmpty(NINJA_LFLAGS): error("Missing linker flags from QtWebEngineCore linking pri") -isEmpty(NINJA_ARCHIVES): error("Missing archive files from QtWebEngineCore linking pri") -isEmpty(NINJA_LIBS): error("Missing library files from QtWebEngineCore linking pri") -NINJA_OBJECTS = $$eval($$list($$NINJA_OBJECTS)) -# Do manual response file linking for macOS and Linux - -RSP_OBJECT_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_o.rsp -for(object, NINJA_OBJECTS): RSP_O_CONTENT += $$object -write_file($$RSP_OBJECT_FILE, RSP_O_CONTENT) -RSP_ARCHIVE_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_a.rsp -for(archive, NINJA_ARCHIVES): RSP_A_CONTENT += $$archive -write_file($$RSP_ARCHIVE_FILE, RSP_A_CONTENT) - -macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($${RSP_OBJECT_FILE}) @$${RSP_ARCHIVE_FILE} -linux:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group -win32:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} @$${RSP_ARCHIVE_FILE} - -LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS -# GN's LFLAGS doesn't always work across all the Linux configurations we support. -# The Windows and macOS ones from GN does provide a few useful flags however - -unix:qtConfig(webengine-noexecstack): \ - QMAKE_LFLAGS += -Wl,-z,noexecstack -linux { - # add chromium flags - for(flag, NINJA_LFLAGS) { - # filter out some flags - !contains(flag, .*noexecstack$): \ - !contains(flag, .*as-needed$): \ - !contains(flag, ^-B.*): \ - !contains(flag, ^-fuse-ld.*): \ - QMAKE_LFLAGS += $$flag - } -} else { - QMAKE_LFLAGS += $$NINJA_LFLAGS -} - -POST_TARGETDEPS += $$NINJA_TARGETDEPS - - LIBS_PRIVATE += -L$$api_library_path CONFIG *= no_smart_library_merge osx { @@ -86,6 +34,9 @@ win32 { POST_TARGETDEPS += $${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a } +# Needed to set a CFBundleIdentifier +QMAKE_INFO_PLIST = Info_mac.plist + # Using -Wl,-Bsymbolic-functions seems to confuse the dynamic linker # and doesn't let Chromium get access to libc symbols through dlsym. CONFIG -= bsymbolic_functions |