Bug 255996 - [bmalloc] Prevent warning when building bmalloc using MSVC without libpas.
Summary: [bmalloc] Prevent warning when building bmalloc using MSVC without libpas.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: bmalloc (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 143310
  Show dependency treegraph
 
Reported: 2023-04-26 10:46 PDT by Basuke Suzuki
Modified: 2023-04-26 15:25 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2023-04-26 10:46:55 PDT
When build bmalloc without libpas enabled by MSVC, following warning is reported while compiling libpas code:

[1/2457] Building C object Source\bmalloc\CMakeFiles\bmalloc.dir\libpas\src\libpas\iso_heap.c.obj
FAILED: Source/bmalloc/CMakeFiles/bmalloc.dir/libpas/src/libpas/iso_heap.c.obj
C:\PROGRA~1\MICROS~1\2022\PROFES~1\VC\Tools\MSVC\1435~1.322\bin\Hostx64\x64\cl.exe  /nologo -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DBUILDING_bmalloc -DHAVE_CONFIG_H=1 -DNOCRYPT -DNOMINMAX -DPAS_BMALLOC=1 -DUNICODE -DWINVER=0x601 -D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_NO_WARNINGS -D_GNU_SOURCE -D_HAS_EXCEPTIONS=0 -D_UNICODE -D_WIN32_WINNT=0x601 -D_WINDOWS -D_WINSOCKAPI_="" -IC:\webkit\WebKitLibraries\win\include -IC:\webkit\Source\bmalloc -IC:\webkit\Source\bmalloc\bmalloc -IC:\webkit\Source\bmalloc\libpas\src\libpas /W4 /DWIN32 /D_WINDOWS /O2 /Ob2 /DNDEBUG -MD /wd4018 /wd4060 /wd4068 /wd4100 /wd4127 /wd4146 /wd4189 /wd4201 /wd4244 /wd4245 /wd4251 /wd4275 /wd4267 /wd4305 /wd4309 /wd4312 /wd4324 /wd4389 /wd4456 /wd4457 /wd4458 /wd4459 /wd4505 /wd4611 /wd4646 /wd4701 /wd4702 /wd4706 /wd4715 /wd4722 /wd4723 /wd4805 /wd4838 /wd4840 /wd4996 /wd5205 /wd5054 /wd5055 /Zi /GS /EHa- /EHc- /EHs- /fp:except- /analyze- /bigobj -D_ENABLE_EXTENDED_ALIGNED_STORAGE /utf-8 /validate-charset /Oy- /Zc:lambda /WX /showIncludes /FoSource\bmalloc\CMakeFiles\bmalloc.dir\libpas\src\libpas\iso_heap.c.obj /FdSource\bmalloc\CMakeFiles\bmalloc.dir\ /FS -c C:\webkit\Source\bmalloc\libpas\src\libpas\iso_heap.c
C:\webkit\Source\bmalloc\libpas\src\libpas\iso_heap.c(304): error C2220: the following warning is treated as an error
C:\webkit\Source\bmalloc\libpas\src\libpas\iso_heap.c(304): warning C4206: nonstandard extension used: translation unit is empty

This is because `LIBPAS_ENABLED` is false and entire C file is empty after preprocessing. 
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4206?view=msvc-170

It should be okay to ignore this error on bmalloc build.
Comment 1 EWS 2023-04-26 15:24:10 PDT
Committed 263436@main (076ada7d6d7a): <https://commits.webkit.org/263436@main>

Reviewed commits have been landed. Closing PR #13200 and removing active labels.
Comment 2 Radar WebKit Bug Importer 2023-04-26 15:25:21 PDT
<rdar://problem/108578497>