File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ if (${CMAKE_GENERATOR} MATCHES "Ninja")
119
119
# Gyp wants to use its own clang if we don't set this:
120
120
list (APPEND V8_GYP_ARGS
121
121
-Dclang=0 )
122
- # -Dv8_use_snapshot=true
122
+
123
123
list (APPEND V8_GYP_ARGS
124
124
-I${V8_DIR}/build/standalone.gypi
125
125
--depth=.
@@ -131,6 +131,7 @@ if (${CMAKE_GENERATOR} MATCHES "Ninja")
131
131
)
132
132
133
133
set (NINJA_BUILD_DIR "${V8_TARGET_DIR} /${NINJA_TARGET} " )
134
+
134
135
ExternalProject_Add (v8_build
135
136
SOURCE_DIR
136
137
"${V8_DIR} "
@@ -323,6 +324,10 @@ else ()
323
324
324
325
option (USE_DEBUG_V8 "compile V8 in DEBUG mode" OFF )
325
326
327
+ set (V8_CFLAGS "" )
328
+ set (V8_CXXFLAGS "" )
329
+ set (V8_LDFLAGS "" )
330
+
326
331
if (USE_DEBUG_V8 )
327
332
set (V8_TARGET_ARCH "${V8_PROC_ARCH} .debug" )
328
333
else ()
@@ -361,19 +366,23 @@ else ()
361
366
-Dwerror=
362
367
)
363
368
369
+ if (APPLE AND CMAKE_COMPILER_IS_CLANG )
370
+ set (V8_CXXFLAGS "${V8_CXXFLAGS} -stdlib=libc++" )
371
+ set (V8_LDFLAGS "${V8_LDFLAGS} -stdlib=libc++" )
372
+ endif ()
373
+
364
374
set (V8_COMPILE_ARGS
365
375
-C ${V8_TARGET_DIR}
366
376
-f Makefile.${V8_TARGET_ARCH}
367
377
BUILDTYPE=Release
368
378
builddir=${V8_TARGET_DIR}/${V8_TARGET_ARCH}
369
379
CC=${CMAKE_C_COMPILER}
370
380
CXX=${CMAKE_CXX_COMPILER}
381
+ CFLAGS=${V8_CFLAGS}
382
+ CXXFLAGS=${V8_CXXFLAGS}
383
+ LDFLAGS=${V8_LDFLAGS}
371
384
)
372
385
373
- if (APPLE AND CMAKE_COMPILER_IS_CLANG )
374
- list (APPEND V8_COMPILE_ARGS CXXFLAGS=-stdlib=libc++ LDFLAGS=-stdlib=libc++ )
375
- endif ()
376
-
377
386
list (APPEND V8_COMPILE_ARGS icui18n icuuc icudata )
378
387
list (APPEND V8_COMPILE_ARGS v8 )
379
388
You can’t perform that action at this time.
0 commit comments