[Webkit-unassigned] [Bug 179971] New: [CMake] Values of CMAKE_BUILD_TYPE from toolchain file are ignored
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 23 02:23:26 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=179971
Bug ID: 179971
Summary: [CMake] Values of CMAKE_BUILD_TYPE from toolchain file
are ignored
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: aperez at igalia.com
CC: lforschler at apple.com
I have noticed this one while working with Buildroot. For CMake-based
packages it generates a “Toolchain file” [1] which defines the paths
to the cross-compilation tools, build options, and so on. This toolchain
file also specifies the build type with:
# Build type from the Buildroot configuration
set(CMAKE_BUILD_TYPE Release CACHE STRING "Buildroot build configuration")
Nevertheless, when WebKit is configured with the above setting, it will
notify that “RelWithDebInfo” is being used instead (output re-formatted
by me for clarity) — the value from the toolchain file is ignored:
>>> wpewebkit custom Configuring
(mkdir -p /home/aperez/devel/wpe/buildroot-wpe-overlay/buildroot-2017.08.1/output/build/wpewebkit-custom/ && \
cd /home/aperez/devel/wpe/buildroot-wpe-overlay/buildroot-2017.08.1/output/build/wpewebkit-custom/ && \
rm -f CMakeCache.txt && \
PATH="/home/aperez/devel/wpe/buildroot-wpe-overlay/buildroot-2017.08.1/output/host/bin:/home/aperez/devel/wpe/buildroot-wpe-overlay/buildroot-2017.08.1/output/host/sbin:/usr/local/bin:/usr/local/sbin" \
/usr/bin/cmake /home/aperez/devel/wpe/buildroot-wpe-overlay/buildroot-2017.08.1/output/build/wpewebkit-custom/ \
-DCMAKE_TOOLCHAIN_FILE="/home/aperez/devel/wpe/buildroot-wpe-overlay/buildroot-2017.08.1/output/host/share/buildroot/toolchainfile.cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_DOC=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLE=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TEST=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_API_TESTS=OFF \
-DENABLE_GEOLOCATION=OFF \
-DENABLE_GTKDOC=OFF \
-DENABLE_INTROSPECTION=OFF \
-DENABLE_MINIBROWSER=OFF \
-DENABLE_SPELLCHECK=OFF \
-DPORT=WPE \
-DENABLE_JIT=ON \
-DENABLE_VIDEO=OFF \
-DENABLE_WEB_AUDIO=OFF \
-DENABLE_MEDIA_STREAM=OFF \
-DENABLE_WEB_CRYPTO=OFF \
-DENABLE_WEBDRIVER=OFF \
-DENABLE_XSLT=OFF )
CMake Warning at CMakeLists.txt:7 (message):
No CMAKE_BUILD_TYPE value specified, defaulting to RelWithDebInfo.
Probably this has to do with how we are trying to detect whether “CMAKE_BUILD_TYPE”
was set (or not) in the command line. In this case it is not coming directly from
the command line, and it is being reset to “RelWithDebInfo”.
This is definitely having an impact on the build results: If I patch the Buildroot
recipe to pass “-DCMAKE_BUILD_TYPE=Release” in the command line, instead of letting
the default “RelWithDebInfo” overwrite the setting from the toolchain file, then
the resulting binaries take ~17 MiB less of disk space.
---
[1] https://cmake.org/cmake/help/v3.3/variable/CMAKE_TOOLCHAIN_FILE.html
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171123/31cd058d/attachment.html>
More information about the webkit-unassigned
mailing list