X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Farchitecture.cpp;h=7faefeb456f3953548084782c63079fc466a59fc;hb=c45cc6fd2b13513909d43b5f95370b00c8b4c25e;hp=fd31bcdbfd942a9ad05146d73e7dbb73fcecc38b;hpb=b58e16b078df97d8aabf64a8e4d0d8ce37ad3877;p=builder.git diff --git a/source/architecture.cpp b/source/architecture.cpp index fd31bcd..7faefeb 100644 --- a/source/architecture.cpp +++ b/source/architecture.cpp @@ -124,16 +124,17 @@ Architecture::Architecture(Builder &b, const string &spec): bool Architecture::match_name(const string &pattern) const { - vector parts = split(pattern, "-"); + bool negate = (pattern[0]=='!'); + vector parts = split(pattern.substr(negate), "-"); for(vector::const_iterator i=parts.begin(); i!=parts.end(); ++i) { string part = resolve_alias(*i); if((part=="32" && bits==32) || (part=="64" && bits==64)) ; else if(part!=type && part!=cpu && part!=system) - return false; + return negate; } - return true; + return !negate; } string Architecture::resolve_alias(const string &part) const