Skip to content

Commit

Permalink
build: fix V8 build on FreeBSD
Browse files Browse the repository at this point in the history
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: #12784
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
targos committed May 6, 2017
1 parent 5b63fab commit bf5c309
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand Down

0 comments on commit bf5c309

Please sign in to comment.