diff options
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/cc/pkgconfig.cxx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx index 516746b..bbcddf9 100644 --- a/libbuild2/cc/pkgconfig.cxx +++ b/libbuild2/cc/pkgconfig.cxx @@ -972,13 +972,23 @@ namespace build2 else p = string (o, 2); - dir_path d (move (p)); + try + { + dir_path d (move (p)); - if (d.relative ()) - fail << "relative -L directory in '" << lflags () << "'" << - info << "while parsing pkg-config --libs " << pc.path; + if (d.relative ()) + fail << "relative -L directory '" << d << "' in '" + << lflags () << "'" << + info << "while parsing pkg-config --libs " << pc.path; - usrd->push_back (move (d)); + usrd->push_back (move (d)); + } + catch (const invalid_path& e) + { + fail << "invalid -L directory '" << e.path << "' in '" + << lflags () << "'" << + info << "while parsing pkg-config --libs " << pc.path; + } } } } |