From ebb90900af8e00f24601dc4c6d6c6579d50bb921 Mon Sep 17 00:00:00 2001 From: nanaya Date: Wed, 5 Jul 2017 15:49:18 +0900 Subject: [PATCH] tools: skip workaround for newer llvm PR-URL: https://github.com/nodejs/node/pull/14077 Fixes: https://github.com/nodejs/node/issues/14076 Refs: https://svnweb.freebsd.org/ports/head/www/node/Makefile?revision=444555&view=markup Reviewed-By: Ben Noordhuis Reviewed-By: Refael Ackermann --- common.gypi | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common.gypi b/common.gypi index ea08e80365b5c6..6677274f3abe80 100644 --- a/common.gypi +++ b/common.gypi @@ -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"', { + # 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', ],