Skip to content

Commit 685cdeb

Browse files
committed
[PlayStation] Make C files in testapi compile with a C standard rather than C++ one
https://bugs.webkit.org/show_bug.cgi?id=228701 Reviewed by Ross Kirsling. * shell/PlatformPlayStation.cmake: Set standard for C files in testapi Canonical link: https://commits.webkit.org/240193@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent a3569b0 commit 685cdeb

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

Source/JavaScriptCore/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2021-08-02 Stephan Szabo <stephan.szabo@sony.com>
2+
3+
[PlayStation] Make C files in testapi compile with a C standard rather than C++ one
4+
https://bugs.webkit.org/show_bug.cgi?id=228701
5+
6+
Reviewed by Ross Kirsling.
7+
8+
* shell/PlatformPlayStation.cmake: Set standard for C files in testapi
9+
110
2021-08-02 Yusuke Suzuki <ysuzuki@apple.com>
211

312
[JSC] Yarr should use Bitmap instead of ByteVector for BoyerMoore search

Source/JavaScriptCore/shell/PlatformPlayStation.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,13 @@ set(PLAYSTATION_jsc_MAIN_THREAD_NAME "JSCShell")
2424
if (${CMAKE_GENERATOR} MATCHES "Visual Studio")
2525
set_target_properties(jsc PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
2626
endif ()
27+
28+
29+
if (${CMAKE_GENERATOR} MATCHES "Visual Studio")
30+
# With the VisualStudio generator, the compiler complains about -std=c++* for C sources.
31+
set_source_files_properties(
32+
../API/tests/CustomGlobalObjectClassTest.c
33+
../API/tests/testapi.c
34+
PROPERTIES COMPILE_FLAGS --std=gnu17
35+
)
36+
endif ()

0 commit comments

Comments
 (0)