[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-13 Thread Petr Hosek via cfe-commits
petrhosek wrote: I'm fine with the feature, my only concern is to make sure we don't unintentionally make it harder to integrate potential future extensions such as the mutually dependent groups. The only alternative I could come up with is representing groups as first class concept with prop

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-14 Thread Simon Tatham via cfe-commits
statham-arm wrote: > my only concern is to make sure we don't unintentionally make it harder to > integrate potential future extensions such as the mutually dependent groups. Hmmm. So if you had both ME and MD groups, you might also need a _group_ to be able to be a member of another group? Th

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-14 Thread Petr Hosek via cfe-commits
petrhosek wrote: > Would you accept `Type: Exclusive` instead of `Exclusive: True`? It seems > more plausible to me that there might be three kinds of group that _can't_ go > together than three group-type flags that you can have in any combination. I like this as it scales better to other typ

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-16 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From 2a65ae75e8c8e62e7275a439849837919599e896 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH 1/4] [Driver] Add ExclusiveGroup feature to multilib.yaml. Thi

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-16 Thread Simon Tatham via cfe-commits
statham-arm wrote: OK, here's a version with the syntax that way. I've added another test to demonstrate the new error checks. The implementation of exclusion is still done by having an `ExclusiveGroup` field in the actual `Multilib` class. Implementing mutually-dependent groups or nested gro

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-16 Thread Simon Tatham via cfe-commits
statham-arm wrote: (btw, that `squash!` commit contains the revised commit message I plan to put on the final version, so I need to not forget to do the squash by hand to get that right) https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-06 Thread Simon Tatham via cfe-commits
statham-arm wrote: @petrhosek, do you have any further comments? I'll merge this change based on @MaskRay's approval if I haven't heard back in another week. https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@list

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-26 Thread Fangrui Song via cfe-commits
@@ -96,13 +97,39 @@ bool MultilibSet::select(const Multilib::flags_list &Flags, llvm::SmallVector &Selected) const { llvm::StringSet<> FlagSet(expandFlags(Flags)); Selected.clear(); - llvm::copy_if(Multilibs, std::back_inserter(Selected), -

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-26 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,69 @@ +# REQUIRES: shell +# UNSUPPORTED: system-windows + +# RUN: rm -rf %t + +# RUN: mkdir -p %t/baremetal_multilib/bin +# RUN: ln -s %clang %t/baremetal_multilib/bin/clang + +# RUN: mkdir -p %t/baremetal_multilib/lib/clang-runtimes +# RUN: ln -s %s %t/baremetal_multil

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-26 Thread Fangrui Song via cfe-commits
@@ -152,6 +180,7 @@ template <> struct llvm::yaml::MappingTraits { static void mapping(llvm::yaml::IO &io, MultilibSerialization &V) { io.mapRequired("Dir", V.Dir); io.mapRequired("Flags", V.Flags); +io.mapOptional("ExclusiveGroup", V.ExclusiveGroup); ---

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-26 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,69 @@ +# REQUIRES: shell +# UNSUPPORTED: system-windows + +# RUN: rm -rf %t + +# RUN: mkdir -p %t/baremetal_multilib/bin +# RUN: ln -s %clang %t/baremetal_multilib/bin/clang + +# RUN: mkdir -p %t/baremetal_multilib/lib/clang-runtimes +# RUN: ln -s %s %t/baremetal_multil

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-26 Thread Fangrui Song via cfe-commits
@@ -96,13 +97,39 @@ bool MultilibSet::select(const Multilib::flags_list &Flags, llvm::SmallVector &Selected) const { llvm::StringSet<> FlagSet(expandFlags(Flags)); Selected.clear(); - llvm::copy_if(Multilibs, std::back_inserter(Selected), -

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-26 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From 2a65ae75e8c8e62e7275a439849837919599e896 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH 1/2] [Driver] Add ExclusiveGroup feature to multilib.yaml. Thi

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Simon Tatham via cfe-commits
@@ -0,0 +1,69 @@ +# REQUIRES: shell +# UNSUPPORTED: system-windows + +# RUN: rm -rf %t + +# RUN: mkdir -p %t/baremetal_multilib/bin +# RUN: ln -s %clang %t/baremetal_multilib/bin/clang + +# RUN: mkdir -p %t/baremetal_multilib/lib/clang-runtimes +# RUN: ln -s %s %t/baremetal_multil

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Simon Tatham via cfe-commits
@@ -152,6 +180,7 @@ template <> struct llvm::yaml::MappingTraits { static void mapping(llvm::yaml::IO &io, MultilibSerialization &V) { io.mapRequired("Dir", V.Dir); io.mapRequired("Flags", V.Flags); +io.mapOptional("ExclusiveGroup", V.ExclusiveGroup); ---

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From 2a65ae75e8c8e62e7275a439849837919599e896 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH 1/2] [Driver] Add ExclusiveGroup feature to multilib.yaml. Thi

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. Looks good to me, but other reviewers likely have opinions https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,70 @@ +# REQUIRES: shell MaskRay wrote: If `LIT_USE_INTERNAL_SHELL=1 llvm-lit ..` passes, you can remove `# REQUIRES: shell` (dependency on an external shell) https://github.com/llvm/llvm-project/pull/69447 ___

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Fangrui Song via cfe-commits
@@ -96,13 +98,36 @@ bool MultilibSet::select(const Multilib::flags_list &Flags, llvm::SmallVector &Selected) const { llvm::StringSet<> FlagSet(expandFlags(Flags)); Selected.clear(); - llvm::copy_if(Multilibs, std::back_inserter(Selected), -

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Fangrui Song via cfe-commits
@@ -96,13 +97,39 @@ bool MultilibSet::select(const Multilib::flags_list &Flags, llvm::SmallVector &Selected) const { llvm::StringSet<> FlagSet(expandFlags(Flags)); Selected.clear(); - llvm::copy_if(Multilibs, std::back_inserter(Selected), -

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-27 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-30 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From 2a65ae75e8c8e62e7275a439849837919599e896 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH 1/3] [Driver] Add ExclusiveGroup feature to multilib.yaml. Thi

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-30 Thread Simon Tatham via cfe-commits
@@ -96,13 +97,39 @@ bool MultilibSet::select(const Multilib::flags_list &Flags, llvm::SmallVector &Selected) const { llvm::StringSet<> FlagSet(expandFlags(Flags)); Selected.clear(); - llvm::copy_if(Multilibs, std::back_inserter(Selected), -

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-30 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm edited https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-18 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm created https://github.com/llvm/llvm-project/pull/69447 This allows a YAML-based multilib configuration to specify explicitly that a subset of its library directories are alternatives to each other, i.e. at most one of that subset should be selected. So if you h

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Simon Tatham (statham-arm) Changes This allows a YAML-based multilib configuration to specify explicitly that a subset of its library directories are alternatives to each other, i.e. at most one of that subset should be selected.

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-18 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff ebdb0cbef5e9be57237403c46bfdbe985313bb1c 5b3289a7ad40850cbe1c438345a181b01c500639 --

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-18 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From 3a0481134343339ce8132419fde875ac9977b734 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH] [Driver] Add ExclusiveGroup feature to multilib.yaml. This al

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-24 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From e4d860c2968e4bf2e0ca198bdfe00dad4e985d40 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH] [Driver] Add ExclusiveGroup feature to multilib.yaml. This al

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-24 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From 2a65ae75e8c8e62e7275a439849837919599e896 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH] [Driver] Add ExclusiveGroup feature to multilib.yaml. This al

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-25 Thread Petr Hosek via cfe-commits
@@ -152,6 +180,7 @@ template <> struct llvm::yaml::MappingTraits { static void mapping(llvm::yaml::IO &io, MultilibSerialization &V) { io.mapRequired("Dir", V.Dir); io.mapRequired("Flags", V.Flags); +io.mapOptional("ExclusiveGroup", V.ExclusiveGroup); ---

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-25 Thread Petr Hosek via cfe-commits
@@ -0,0 +1,69 @@ +# REQUIRES: shell +# UNSUPPORTED: system-windows + +# RUN: rm -rf %t + +# RUN: mkdir -p %t/baremetal_multilib/bin +# RUN: ln -s %clang %t/baremetal_multilib/bin/clang + +# RUN: mkdir -p %t/baremetal_multilib/lib/clang-runtimes +# RUN: ln -s %s %t/baremetal_multil

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-10-25 Thread Simon Tatham via cfe-commits
@@ -152,6 +180,7 @@ template <> struct llvm::yaml::MappingTraits { static void mapping(llvm::yaml::IO &io, MultilibSerialization &V) { io.mapRequired("Dir", V.Dir); io.mapRequired("Flags", V.Flags); +io.mapOptional("ExclusiveGroup", V.ExclusiveGroup); ---

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: > (btw, that `squash!` commit contains the revised commit message I plan to put > on the final version, so I need to not forget to do the squash by hand to get > that right) You may edit the first comment in this PR now, and it will be propagated to the textbox when you click "

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-30 Thread Petr Hosek via cfe-commits
@@ -138,10 +164,34 @@ static const VersionTuple MultilibVersionCurrent(1, 0); struct MultilibSerialization { std::string Dir; std::vector Flags; + std::string Group; +}; + +struct MultilibGroupSerialization { + /* + * Future directions: + * + * If it's needed in fut

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-30 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-12-01 Thread Simon Tatham via cfe-commits
@@ -138,10 +164,34 @@ static const VersionTuple MultilibVersionCurrent(1, 0); struct MultilibSerialization { std::string Dir; std::vector Flags; + std::string Group; +}; + +struct MultilibGroupSerialization { + /* + * Future directions: + * + * If it's needed in fut

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-12-01 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm updated https://github.com/llvm/llvm-project/pull/69447 >From 1140903195e555643ee1a6b9f671b47b0c307f9e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2023 14:51:17 +0100 Subject: [PATCH] [Driver] Add ExclusiveGroup feature to multilib.yaml. This al

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-12-01 Thread Simon Tatham via cfe-commits
statham-arm wrote: (This final force-push is the squashed version of the previous stack, rebased to the current head of `main`, so that the builder can run a last test. Thanks both for the approvals; I'll merge it once the tests have finished.) https://github.com/llvm/llvm-project/pull/69447 _

[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-12-01 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm closed https://github.com/llvm/llvm-project/pull/69447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits