aboutsummaryrefslogtreecommitdiffstats
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2017-05-30 20:56:15 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2017-05-30 21:56:15 -0400
commitb637aec1624e558b0e158064264a2523a4dcba31 (patch)
tree02709cf3c87c29375e1fc52100648709a7625abf /Jenkinsfile
parent5ca7eb75069883bc5be9a078ee85207461fb5d55 (diff)
downloadcryptography-b637aec1624e558b0e158064264a2523a4dcba31.tar.gz
cryptography-b637aec1624e558b0e158064264a2523a4dcba31.tar.bz2
cryptography-b637aec1624e558b0e158064264a2523a4dcba31.zip
runtime detection of getentropy for macOS via weak-linking (#3650)
* runtime detection of getentropy for macOS via weak-linking In the before time, in the long long ago, there was a desire to use getentropy on macOS. So some code was written and it detected getentropy support by seeing if SYS_getentropy was available in the headers. But lo, it turns out Apple ships headers for different SDK versions and users on < 10.12 were getting headers that had SYS_getentropy even though their OS did not support it. There was much wailing and gnashing of teeth, but the frustrated developers remembered that Apple wants their developers to use weak linking. With weak linking the mighty developer can specify a minimum version and any symbol that was added after that version will be weakly linked. Then, at runtime, the dynamic linker will make unavailable symbols thus marked into NULLs. So, the developer need only alter their code to do runtime detection of weakly linked symbols and then a single binary may be compiled that will correctly select getentropy or /dev/urandom at runtime. Hallelujah! * oops * separate the enum * okay just apple
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index a45d0b41..351e2323 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -249,7 +249,7 @@ def build(toxenv, label, imageName, artifacts, artifactExcludes) {
cd cryptography
CRYPTOGRAPHY_SUPPRESS_LINK_FLAGS=1 \
LDFLAGS="/usr/local/opt/openssl\\@1.1/lib/libcrypto.a /usr/local/opt/openssl\\@1.1/lib/libssl.a" \
- CFLAGS="-I/usr/local/opt/openssl\\@1.1/include -Werror -Wno-error=deprecated-declarations -Wno-error=incompatible-pointer-types -Wno-error=unused-function -Wno-error=unused-command-line-argument" \
+ CFLAGS="-I/usr/local/opt/openssl\\@1.1/include -Werror -Wno-error=deprecated-declarations -Wno-error=incompatible-pointer-types -Wno-error=unused-function -Wno-error=unused-command-line-argument -mmacosx-version-min=10.9" \
tox -r -- --color=yes
virtualenv .venv
source .venv/bin/activate