about summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2021-07-08 18:33:05 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2021-07-09 22:24:43 +0200
commitfac5757eecc5f0ca2e2e275e4f0a436368d822de (patch)
tree639af4b2a5ab14bbc2de5a1c99ee73722d31ca70 /pkgs/development/interpreters
parentc786eaf612327455b1eaed7c32563c3d07c3d6be (diff)
downloadnixlib-fac5757eecc5f0ca2e2e275e4f0a436368d822de.tar
nixlib-fac5757eecc5f0ca2e2e275e4f0a436368d822de.tar.gz
nixlib-fac5757eecc5f0ca2e2e275e4f0a436368d822de.tar.bz2
nixlib-fac5757eecc5f0ca2e2e275e4f0a436368d822de.tar.lz
nixlib-fac5757eecc5f0ca2e2e275e4f0a436368d822de.tar.xz
nixlib-fac5757eecc5f0ca2e2e275e4f0a436368d822de.tar.zst
nixlib-fac5757eecc5f0ca2e2e275e4f0a436368d822de.zip
cpython: disable no-semantic-interposition with older clang versions
> clang-7: error: unknown argument: '-fno-semantic-interposition'

This primarily affects current darwin builds, but as soon as they
migrate to a newer clang version they will immediately start benefitting
from this change.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index 842d132fd44c..e9fdc638f6ae 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -40,7 +40,8 @@
 , static ? stdenv.hostPlatform.isStatic
 , enableOptimizations ? false
 # enableNoSemanticInterposition is a subset of the enableOptimizations flag that doesn't harm reproducibility.
-, enableNoSemanticInterposition ? true
+# clang starts supporting `-fno-sematic-interposition` with version 10
+, enableNoSemanticInterposition ? (!stdenv.cc.isClang || (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "10"))
 # enableLTO is a subset of the enableOptimizations flag that doesn't harm reproducibility.
 # enabling LTO on 32bit arch causes downstream packages to fail when linking
 , enableLTO ? stdenv.is64bit