10000 added V8_CFLAGS, V8_CXXFLAGS, V8_LDFLAGS · lethalbrains/arangodb@534a31f · GitHub
[go: up one dir, main page]

Skip to content

Commit 534a31f

Browse files
committed
added V8_CFLAGS, V8_CXXFLAGS, V8_LDFLAGS
1 parent 4de93d4 commit 534a31f

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

3rdParty/V8/CMakeLists.txt

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ if (${CMAKE_GENERATOR} MATCHES "Ninja")
119119
# Gyp wants to use its own clang if we don't set this:
120120
list(APPEND V8_GYP_ARGS
121121
-Dclang=0)
122-
# -Dv8_use_snapshot=true
122+
123123
list(APPEND V8_GYP_ARGS
124124
-I${V8_DIR}/build/standalone.gypi
125125
--depth=.
@@ -131,6 +131,7 @@ if (${CMAKE_GENERATOR} MATCHES "Ninja")
131131
)
132132

133133
set(NINJA_BUILD_DIR "${V8_TARGET_DIR}/${NINJA_TARGET}")
134+
134135
ExternalProject_Add(v8_build
135136
SOURCE_DIR
136137
"${V8_DIR}"
@@ -323,6 +324,10 @@ else ()
323324

324325
option(USE_DEBUG_V8 "compile V8 in DEBUG mode" OFF)
325326

327+
set(V8_CFLAGS "")
328+
set(V8_CXXFLAGS "")
329+
set(V8_LDFLAGS "")
330+
326331
if (USE_DEBUG_V8)
327332
set(V8_TARGET_ARCH "${V8_PROC_ARCH}.debug")
328333
else ()
@@ -361,19 +366,23 @@ else ()
361366
-Dwerror=
362367
)
363368

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+
364374
set(V8_COMPILE_ARGS
365375
-C ${V8_TARGET_DIR}
366376
-f Makefile.${V8_TARGET_ARCH}
367377
BUILDTYPE=Release
368378
builddir=${V8_TARGET_DIR}/${V8_TARGET_ARCH}
369379
CC=${CMAKE_C_COMPILER}
370380
CXX=${CMAKE_CXX_COMPILER}
381+
CFLAGS=${V8_CFLAGS}
382+
CXXFLAGS=${V8_CXXFLAGS}
383+
LDFLAGS=${V8_LDFLAGS}
371384
)
372385

373-
if (APPLE AND CMAKE_COMPILER_IS_CLANG)
374-
list(APPEND V8_COMPILE_ARGS CXXFLAGS=-stdlib=libc++ LDFLAGS=-stdlib=libc++)
375-
endif ()
376-
377386
list(APPEND V8_COMPILE_ARGS icui18n icuuc icudata)
378387
list(APPEND V8_COMPILE_ARGS v8)
379388

0 commit comments

Comments
 (0)
0