Skip to content

Skip linker-output-non-utf8 test on Apple #47289

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

Merged
merged 3 commits into from
Jan 12, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/test/run-make/linker-output-non-utf8/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

# Make sure we don't ICE if the linker prints a non-UTF-8 error message.

ifdef IS_WINDOWS
# ignore windows
# Ignore Windows and Apple

# This does not work in its current form on windows, possibly due to
# gcc bugs or something about valid Windows paths. See issue #29151
# for more information.
all:

else
# This does not work in its current form on Windows or Apple APFS due
# to their filesystems requiring paths to be valid Unicode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure Windows require paths to be valid Unicode? If not, please retain the original comment about Windows, and open a new sentence about the valid Unicode requirement with APFS.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it needs to parse the path as Unicode to perform normalisation and case folding on NTFS and ReFS. MSDN covers this briefly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not true - when MSDN refers to "unicode" it means un-validated UCS-2 - case mapping ignores invalid sequences. @retep998 probably knows more details.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows does not perform unicode normalization on paths. Case folding is also done via a highly simplistic u16 to u16 mapping which will handle lone surrogates just fine. Windows uses WTF-16 for paths, which is a superset of UTF-16.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the correction. I'll switch the comment back.

ifndef IS_WINDOWS
ifneq ($(shell uname),Darwin)

# The zzz it to allow humans to tab complete or glob this thing.
bad_dir := $(TMPDIR)/zzz$$'\xff'
Expand All @@ -20,5 +17,12 @@ all:
mkdir $(bad_dir)
mv $(TMPDIR)/liblibrary.a $(bad_dir)
LIBRARY_PATH=$(bad_dir) $(RUSTC) exec.rs 2>&1 | $(CGREP) this_symbol_not_defined
else
all:

endif

else
all:

endif