|
@@ -34,10 +34,11 @@ private:
|
|
std::string OSSuffix;
|
|
std::string OSSuffix;
|
|
std::string IncludeSuffix;
|
|
std::string IncludeSuffix;
|
|
flags_list Flags;
|
|
flags_list Flags;
|
|
|
|
+ int Priority;
|
|
|
|
|
|
public:
|
|
public:
|
|
Multilib(StringRef GCCSuffix = {}, StringRef OSSuffix = {},
|
|
Multilib(StringRef GCCSuffix = {}, StringRef OSSuffix = {},
|
|
- StringRef IncludeSuffix = {});
|
|
|
|
|
|
+ StringRef IncludeSuffix = {}, int Priority = 0);
|
|
|
|
|
|
/// Get the detected GCC installation path suffix for the multi-arch
|
|
/// Get the detected GCC installation path suffix for the multi-arch
|
|
/// target variant. Always starts with a '/', unless empty
|
|
/// target variant. Always starts with a '/', unless empty
|
|
@@ -77,6 +78,10 @@ public:
|
|
const flags_list &flags() const { return Flags; }
|
|
const flags_list &flags() const { return Flags; }
|
|
flags_list &flags() { return Flags; }
|
|
flags_list &flags() { return Flags; }
|
|
|
|
|
|
|
|
+ /// Returns the multilib priority. When more than one multilib matches flags,
|
|
|
|
+ /// the one with the highest priority is selected, with 0 being the default.
|
|
|
|
+ int priority() const { return Priority; }
|
|
|
|
+
|
|
/// Add a flag to the flags list
|
|
/// Add a flag to the flags list
|
|
/// \p Flag must be a flag accepted by the driver with its leading '-' removed,
|
|
/// \p Flag must be a flag accepted by the driver with its leading '-' removed,
|
|
/// and replaced with either:
|
|
/// and replaced with either:
|