Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,15 @@
'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' ],
'conditions': [
['llvm_version < "4.0"', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this check future proof? Not sure how the < operator operates, but what happens if llvm_version == "10.0"? If it is a string comparison, '10.0' < '4.0'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good quastion, but in that case get_llvm_version would fail since it uses this RegEx r"(^(?:FreeBSD )?clang version|based on LLVM) ([3-9]\.[0-9]+)")
https://github.com/nodejs/node/blob/master/configure#L585

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, in that case don't worry about it. We'll have to update everything anyway when 10.0 comes.

# Use this flag because on FreeBSD std::pairs copy constructor is non-trivial.
# Doesn't apply to llvm 4.0 (FreeBSD 11.1) or later.
# Refs: https://lists.freebsd.org/pipermail/freebsd-toolchain/2016-March/002094.html
# Refs: https://svnweb.freebsd.org/ports/head/www/node/Makefile?revision=444555&view=markup
'cflags': [ '-D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1' ],
}],
],
'ldflags': [
'-Wl,--export-dynamic',
],
Expand Down