From 8d6b74d3474080bd29dd698f55e88aba17c6a69e Mon Sep 17 00:00:00 2001 From: woodfairy Date: Mon, 19 Oct 2020 09:27:06 +0200 Subject: [PATCH] build: enable ASLR (PIE) on OS X After conducting several benchmarks, I noticed performance losses of 5-10%. As OS X is not a performance critical platform, as already mentioned by @bnoordhuis, I have removed the -no_pie flag at least for this platform. I'd love to enable PIE for other platforms if the 5-10% speed loss is not too high. I would be happy to hear your opinion on this. Refs: https://github.com/nodejs/node/issues/33425 PR-URL: https://github.com/nodejs/node/pull/35704 Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: David Carlier Reviewed-By: Rich Trott Reviewed-By: Matteo Collina --- common.gypi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index cae6662364984c..8bc115b1d6bfbd 100644 --- a/common.gypi +++ b/common.gypi @@ -495,8 +495,7 @@ ['_type!="static_library"', { 'xcode_settings': { 'OTHER_LDFLAGS': [ - '-Wl,-no_pie', - '-Wl,-search_paths_first', + '-Wl,-search_paths_first' ], }, }],