aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/compile.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/cc/compile.cxx')
-rw-r--r--build2/cc/compile.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index 49ff453..6022fb6 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -2172,7 +2172,22 @@ namespace build2
//
if (!cache)
{
- f.realize ();
+ // While we can reasonably expect this path to exit, things do
+ // go south from time to time (like compiling under wine with
+ // file wlantypes.h included as WlanTypes.h).
+ //
+ try
+ {
+ f.realize ();
+ }
+ catch (const invalid_path&)
+ {
+ fail << "invalid header path '" << f << "'";
+ }
+ catch (const system_error& e)
+ {
+ fail << "invalid header path '" << f << "': " << e;
+ }
if (!so_map.empty ())
{