-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Darwin stdenv bump LLVM to 11 #126411
Darwin stdenv bump LLVM to 11 #126411
Changes from all commits
d4f8b6b
83f1f89
7ce2c4c
84a2d7f
c1e7403
3f99f97
acb3b40
e0c636a
9827cc1
25962d6
be88e55
7501da7
0a678b4
dcc5734
0571d21
aded7c9
af78560
3d67386
9e9782a
2ac563c
2260084
1bf996c
193202c
4e54a20
48511c3
6e8058f
a831970
001b24c
f0d2130
8808d7b
b813413
ae6aeb1
2d58a98
fb48ffb
0cc7659
0456f72
205fd0f
ae0def4
65e530a
bd455d1
039825b
0aaca4b
c6de599
2c5c8ce
9343b9c
d22ee62
b1122c2
b91a3f7
4cabdf3
799a69c
efb10ab
5442a41
f61c760
ecce906
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- a/Makefile.am | ||
+++ b/Makefile.am | ||
@@ -34,7 +34,7 @@ docfiles = \ | ||
README.md \ | ||
RELEASE-DATE \ | ||
TODO \ | ||
- VERSION | ||
+ VERSION.txt | ||
|
||
EXTRA_DIST = \ | ||
cmake \ | ||
@@ -61,7 +61,7 @@ SUBDIRS = port libtiff tools build contrib test man html | ||
|
||
release: | ||
(rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE) | ||
- (rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION) | ||
+ (rm -f $(top_srcdir)/VERSION.txt && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION.txt) | ||
(rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h) | ||
|
||
pkgconfigdir = $(libdir)/pkgconfig |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ lib, stdenv, buildPythonPackage, isPyPy, fetchPypi, libffi, pycparser, pytestCheckHook }: | ||
{ lib, stdenv, buildPythonPackage, isPyPy, fetchPypi, pytestCheckHook, | ||
libffi, pkg-config, pycparser | ||
}: | ||
|
||
if isPyPy then null else buildPythonPackage rec { | ||
pname = "cffi"; | ||
|
@@ -13,27 +15,22 @@ if isPyPy then null else buildPythonPackage rec { | |
|
||
buildInputs = [ libffi ]; | ||
|
||
nativeBuildInputs = [ pkg-config ]; | ||
|
||
propagatedBuildInputs = [ pycparser ]; | ||
|
||
# On Darwin, the cffi tests want to hit libm a lot, and look for it in a global | ||
# impure search path. It's obnoxious how much repetition there is, and how difficult | ||
# it is to get it to search somewhere else (since we do actually have a libm symlink in libSystem) | ||
prePatch = lib.optionalString stdenv.isDarwin '' | ||
substituteInPlace testing/cffi0/test_parsing.py \ | ||
--replace 'lib_m = "m"' 'lib_m = "System"' \ | ||
--replace '"libm" in name' '"libSystem" in name' | ||
substituteInPlace testing/cffi0/test_unicode_literals.py --replace 'lib_m = "m"' 'lib_m = "System"' | ||
substituteInPlace testing/cffi0/test_zdistutils.py --replace 'self.lib_m = "m"' 'self.lib_m = "System"' | ||
substituteInPlace testing/cffi1/test_recompiler.py --replace 'lib_m = "m"' 'lib_m = "System"' | ||
substituteInPlace testing/cffi0/test_function.py --replace "lib_m = 'm'" "lib_m = 'System'" | ||
substituteInPlace testing/cffi0/test_verify.py --replace "lib_m = ['m']" "lib_m = ['System']" | ||
# Remove setup.py impurities | ||
substituteInPlace setup.py --replace "'-iwithsysroot/usr/include/ffi'" "" | ||
substituteInPlace setup.py --replace "'/usr/include/ffi'," "" | ||
substituteInPlace setup.py --replace '/usr/include/libffi' '${lib.getDev libffi}/include' | ||
''; | ||
|
||
# The tests use -Werror but with python3.6 clang detects some unreachable code. | ||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang | ||
"-Wno-unused-command-line-argument -Wno-unreachable-code"; | ||
"-Wno-unused-command-line-argument -Wno-unreachable-code -Wno-c++11-narrowing"; | ||
|
||
doCheck = !stdenv.hostPlatform.isMusl && !stdenv.isDarwin; # TODO: Investigate | ||
doCheck = !stdenv.hostPlatform.isMusl; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Excellent! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this broke aarch64-darwin:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
checkInputs = [ pytestCheckHook ]; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,10 +79,6 @@ buildPythonPackage rec { | |
py.test ${pytestFlags} tests | ||
''; | ||
|
||
# IOKit's dependencies are inconsistent between OSX versions, so this is the best we | ||
# can do until nix 1.11's release | ||
__impureHostDeps = [ "/usr/lib" ]; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Woohoo! |
||
meta = with lib; { | ||
description = "A package which provides cryptographic recipes and primitives"; | ||
longDescription = '' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 181617387841b695ee77b162babf9fb177002fcb Mon Sep 17 00:00:00 2001 | ||
From: toonn <toonn@toonn.io> | ||
Date: Mon, 20 Sep 2021 11:39:46 +0200 | ||
Subject: [PATCH] test-images: Use normalization equivalent character | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
One of the test images used a combining character `ä` that can be | ||
encoded multiple ways. This means the file's name can end up encoded | ||
differently depending on whether/which normal form the filesystem uses. | ||
|
||
For Nix this causes a different hash for a FOD depending on the | ||
filesystem where it is evaluated. This is problematic because hashes | ||
fail to match up when evaluating the FOD across multiple platforms. | ||
--- | ||
tests/roots/test-images/index.rst | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/tests/roots/test-images/index.rst b/tests/roots/test-images/index.rst | ||
index 14a2987..219842e 100644 | ||
--- a/tests/roots/test-images/index.rst | ||
+++ b/tests/roots/test-images/index.rst | ||
@@ -13,7 +13,7 @@ test-image | ||
|
||
The caption of img | ||
|
||
-.. image:: testimäge.png | ||
+.. image:: testimæge.png | ||
|
||
.. image:: rimg.png | ||
:target: https://www.sphinx-doc.org/ | ||
-- | ||
2.17.2 (Apple Git-113) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 5879a4bbc34d1eb25e160b15b2f5a4f10eac6bd2 Mon Sep 17 00:00:00 2001 | ||
From: toonn <toonn@toonn.io> | ||
Date: Mon, 13 Sep 2021 18:07:26 +0200 | ||
Subject: [PATCH] =?UTF-8?q?tests:=20Rename=20a=CC=8Aa=CC=88o=CC=88=5F?= | ||
=?UTF-8?q?=E6=97=A5=E6=9C=AC=E8=AA=9E.py=20=3D>=20=C3=A6=C9=90=C3=B8=5F?= | ||
=?UTF-8?q?=E6=97=A5=E6=9C=AC=E5=83=B9.py?= | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
`åäö_日本語.py` normalizes differently in NFC and NFD normal forms. This | ||
means a hash generated for the source directory can differ depending on | ||
whether or not the filesystem is normalizing and which normal form it | ||
uses. | ||
|
||
By renaming the file to `æɐø_日本價.py` we avoid this issue by using a | ||
name that has the same encoding in each normal form. | ||
--- | ||
tests/test_bdist_wheel.py | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/tests/test_bdist_wheel.py b/tests/test_bdist_wheel.py | ||
index 651c034..9b94ac8 100644 | ||
--- a/tests/test_bdist_wheel.py | ||
+++ b/tests/test_bdist_wheel.py | ||
@@ -58,7 +58,7 @@ def test_unicode_record(wheel_paths): | ||
with ZipFile(path) as zf: | ||
record = zf.read('unicode.dist-0.1.dist-info/RECORD') | ||
|
||
- assert u'åäö_日本語.py'.encode('utf-8') in record | ||
+ assert u'æɐø_日本價.py'.encode('utf-8') in record | ||
|
||
|
||
def test_licenses_default(dummy_dist, monkeypatch, tmpdir): | ||
-- | ||
2.17.2 (Apple Git-113) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When changing LLVM files like this, please make the change to all appropriate versions, or the changes will be lost next time we upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done this for LLVM 12 and 13 now. Older LLVM posed some challenges so I'd rather skip them. The only place this is in use so far is the Darwin stdenv and we wouldn't use older LLVMs for that anyway, going forward.
I do want to note that this is basically a cargo-cult of the changes for LLVM 7. I did run into this problem here but I can't find a way to reproduce it. Even the example from the commit making the changes for LLVM 7 (fece3eb) doesn't help because I cannot figure out how to generate
<hash>-libc++-<version>
, note the++
rather thanxx
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unfortunate, but the main thing is that it's in the most recent version, so it gets carried forward when 13 is copied to 14, etc, so I think it's okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked to @thefloweringash about this. The reason I couldn't generate a path with
libc++
is that this changed in a refactor...