X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Farchitecture.cpp;h=7faefeb456f3953548084782c63079fc466a59fc;hb=9e28243c9687608ec3c32954b4031490296ae877;hp=97ed2fe07dce2a0b0ebe9c5be4325e2c91486378;hpb=c51884994862b02613c2c0ae75b1f8d39e0f1ee5;p=builder.git diff --git a/source/architecture.cpp b/source/architecture.cpp index 97ed2fe..7faefeb 100644 --- a/source/architecture.cpp +++ b/source/architecture.cpp @@ -108,8 +108,10 @@ Architecture::Architecture(Builder &b, const string &spec): { sharedlib_patterns.push_back(Pattern("%.dll")); sharedlib_patterns.push_back(Pattern("lib%.dll")); + /* XXX Hack: Consider import libraries (*.dll.a) as dynamic libraries, + even though technically they are linked statically. */ + sharedlib_patterns.push_back(Pattern("lib%.dll.a")); staticlib_patterns.push_back(Pattern("lib%.a")); - staticlib_patterns.push_back(Pattern("lib%.dll.a")); executable_patterns.push_back(Pattern("%.exe")); } else @@ -120,23 +122,19 @@ Architecture::Architecture(Builder &b, const string &spec): } } -void Architecture::set_cross_prefix(const string &p) -{ - cross_prefix = p; -} - 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