This repository was archived by the owner on Mar 29, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +9
-12
lines changed Expand file tree Collapse file tree 6 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1
- --gen-suppressions=all
2
- --suppressions=./.valgrind-v8.supp
3
- --suppressions=./.valgrind-docker.supp
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ if test "$PHP_V8" != "no"; then
117
117
PHP_SUBST(V8_SHARED_LIBADD)
118
118
PHP_REQUIRE_CXX()
119
119
120
- CPPFLAGS="$CPPFLAGS -std=c++11 "
120
+ CPPFLAGS="$CPPFLAGS -std=c++14 "
121
121
122
122
# On OS X clang reports warnings in zeng_strings.h, like
123
123
# php/Zend/zend_string.h:326:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ void weak_callback(const v8::WeakCallbackInfo<v8::Persistent<v8::String>>& data)
15
15
int main (int argc, char * argv[]) {
16
16
// Initialize V8.
17
17
v8::V8::InitializeICU ();
18
- v8::Platform *platform = v8::platform::CreateDefaultPlatform ();
19
- v8::V8::InitializePlatform (platform);
20
18
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 ());
23
21
24
22
V8::Initialize ();
25
23
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ INCLUDE_DIR=$ROOT/include
8
8
9
9
set -x
10
10
11
- g++ -std=c++14 hello_world.cpp -o hello_world \
11
+ g++ hello_world.cpp -o hello_world \
12
12
-g \
13
13
-O2 \
14
- -std=c++11 \
14
+ -std=c++14 \
15
15
-I$INCLUDE_DIR \
16
16
-L$LIB_DIR \
17
17
-Wl,-rpath,$LIB_DIR \
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ INCLUDE_DIR=$ROOT/include
9
9
g++ hello_world.cpp -o hello_world \
10
10
-g \
11
11
-O2 \
12
- -std=c++11 \
12
+ -std=c++14 \
13
13
-I$SRC_DIR \
14
14
-I$INCLUDE_DIR \
15
15
-L$LIB_DIR \
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ void php_v8_init()
31
31
32
32
// If we use snapshot and extenal startup data then we have to initialize it (see https://codereview.chromium.org/315033002/)
33
33
// 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 ();
35
37
v8::V8::InitializePlatform (platform);
36
38
37
39
// const char *flags = "--no-hard_abort";
You can’t perform that action at this time.
0 commit comments