build: fix V8 build on FreeBSD

Use the -D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1 flag because on FreeBSD
std::pairs copy constructor is non-trivial.

Refs: https://lists.freebsd.org/pipermail/freebsd-toolchain/2016-March/002094.html
Refs: https://github.com/gliaskos/freebsd-chromium/blob/master/www/chromium/Makefile#L202-L205

PR-URL: https://github.com/nodejs/node/pull/12784
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
pull/12876/head
Michaël Zasso 2017-05-05 14:50:44 +02:00
parent 5b63fabfd8
commit bf5c309b5e
1 changed files with 3 additions and 0 deletions

View File

@ -410,6 +410,9 @@
'libraries': [ '-lelf' ],
}],
['OS=="freebsd"', {
# Use this flag because on FreeBSD std::pairs copy constructor is non-trivial
# https://lists.freebsd.org/pipermail/freebsd-toolchain/2016-March/002094.html
'cflags': [ '-D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1' ],
'ldflags': [
'-Wl,--export-dynamic',
],