Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Commit a7c6a6b

Browse files
committed
Reland proper libv8 upgrading
1 parent 3845b5d commit a7c6a6b

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

.valgrindrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
--gen-suppressions=all
2-
--suppressions=./.valgrind-v8.supp
3-
--suppressions=./.valgrind-docker.supp

config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ if test "$PHP_V8" != "no"; then
117117
PHP_SUBST(V8_SHARED_LIBADD)
118118
PHP_REQUIRE_CXX()
119119

120-
CPPFLAGS="$CPPFLAGS -std=c++11"
120+
CPPFLAGS="$CPPFLAGS -std=c++14"
121121

122122
# On OS X clang reports warnings in zeng_strings.h, like
123123
# php/Zend/zend_string.h:326:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]

scripts/test_v8/hello_world.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ void weak_callback(const v8::WeakCallbackInfo<v8::Persistent<v8::String>>& data)
1515
int main(int argc, char* argv[]) {
1616
// Initialize V8.
1717
v8::V8::InitializeICU();
18-
v8::Platform *platform = v8::platform::CreateDefaultPlatform();
19-
v8::V8::InitializePlatform(platform);
2018

21-
// std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform();
22-
// v8::V8::InitializePlatform(platform.get());
19+
std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform();
20+
v8::V8::InitializePlatform(platform.get());
2321

2422
V8::Initialize();
2523

scripts/test_v8/hello_world_build_deb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ INCLUDE_DIR=$ROOT/include
88

99
set -x
1010

11-
g++ -std=c++14 hello_world.cpp -o hello_world \
11+
g++ hello_world.cpp -o hello_world \
1212
-g \
1313
-O2 \
14-
-std=c++11 \
14+
-std=c++14 \
1515
-I$INCLUDE_DIR \
1616
-L$LIB_DIR \
1717
-Wl,-rpath,$LIB_DIR \

scripts/test_v8/hello_world_build_osx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ INCLUDE_DIR=$ROOT/include
99
g++ hello_world.cpp -o hello_world \
1010
-g \
1111
-O2 \
12-
-std=c++11 \
12+
-std=c++14 \
1313
-I$SRC_DIR \
1414
-I$INCLUDE_DIR \
1515
-L$LIB_DIR \

src/php_v8_a.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ void php_v8_init()
3131

3232
// If we use snapshot and extenal startup data then we have to initialize it (see https://codereview.chromium.org/315033002/)
3333
// v8::V8::InitializeExternalStartupData(NULL);
34-
v8::Platform *platform = v8::platform::CreateDefaultPlatform();
34+
std::unique_ptr<v8::Platform> platform_unique_ptr = v8::platform::NewDefaultPlatform();
35+
36+
v8::Platform *platform = platform_unique_ptr.release();
3537
v8::V8::InitializePlatform(platform);
3638

3739
// const char *flags = "--no-hard_abort";

0 commit comments

Comments
 (0)