This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Add a MinGW target
ClosedPublic

Authored by mstorsjo on Feb 23 2021, 7:24 AM.

Details

Reviewers
rnk
ldionne
Group Reviewers
Restricted Project
Commits
rGfb2e4f5401d3: [libcxx] [test] Add a MinGW target
Summary

This can't easily be autodetected (unless LIBCXX_TARGET_TRIPLE is specified, or unless we query what the compiler's default target is, which only is supported by clang), but can be chosen manually via LIBCXX_TARGET_INFO.

This chooses mingw style lib naming, and uses -nostdlibc++ instead of -nodefaultlib -nostdlib (as the latter requires specifying a lot of details manually - this is done in the cmake config though).

Diff Detail

Event Timeline

mstorsjo created this revision.Feb 23 2021, 7:24 AM
mstorsjo requested review of this revision.Feb 23 2021, 7:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 23 2021, 7:24 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
rnk accepted this revision.Feb 23 2021, 10:38 AM

lgtm

libcxx/utils/libcxx/test/target_info.py
25

I see, so the existing notion of target info is based on Python's sys.platform, which doesn't distinguish between mingw or MSVC environments.

mstorsjo added inline comments.Feb 23 2021, 10:50 AM
libcxx/utils/libcxx/test/target_info.py
25

Yes, and furthermore, as we might use a msys2/mingw based python to run tests for an msvc build, it isn't necessarily indicative anyway.

ldionne accepted this revision.Feb 25 2021, 1:45 PM
This revision is now accepted and ready to land.Feb 25 2021, 1:45 PM
This revision was automatically updated to reflect the committed changes.