diff options
author | klarlund <klarlund@01de4be4-8c4a-0410-9132-4925637da917> | 2008-05-28 02:32:59 +0000 |
---|---|---|
committer | klarlund <klarlund@01de4be4-8c4a-0410-9132-4925637da917> | 2008-05-28 02:32:59 +0000 |
commit | 6c4d7016534cf5a03432df27088d77a759df9ad8 (patch) | |
tree | aec5d06733a1f22de8216e9135ed2beb93caa02a /include_server/cache_basics.py | |
parent | a2452aa2c5f1a3a0df621c7700029e16f76eab46 (diff) | |
download | distcc-6c4d7016534cf5a03432df27088d77a759df9ad8.tar.gz |
Remove spurious warning messages about absolute filepaths.
During compilation of the Linux kernel messages like:
absolute filepath blabla.h was IGNORED (correctness of build may be affected)
are issued. They are wrong. The problem is that -include or -imacro or even
source file names with absolute filepaths trigger a complaint from the caching
mechanism usually used for relative file names.
We correct this problem.
We also substitute fp_map for includepath_map, which is the now preferred term.
REVIEWER: csilvers@google.com
TESTS:
make pump-maintainer-check
make include-server-maintainer-check
git-svn-id: http://distcc.googlecode.com/svn/trunk@397 01de4be4-8c4a-0410-9132-4925637da917
Diffstat (limited to 'include_server/cache_basics.py')
-rwxr-xr-x | include_server/cache_basics.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include_server/cache_basics.py b/include_server/cache_basics.py index c7142ed..d7c98c2 100755 --- a/include_server/cache_basics.py +++ b/include_server/cache_basics.py @@ -504,12 +504,19 @@ class RelpathMapToIndex(MapToIndex): (below) to bail out. """ - def Index(self, relpath): + def Index(self, relpath, ignore_absolute_path_warning=False): """Return index d > 0 of relative path. - Argument: + Args: directory: a string not starting with /. + ignore_absolute_path_warning: a Boolean + + The variable ignore_absolute_path_warning is set to True in order to + override the requirement that filepaths are relative. This is useful for the + compilation unit filepath and filepaths of -include's: they are permitted to + be absolute because the command line can still be rewritten on the server. + The server tweaks their location to become relative to the server root. """ - if os.path.isabs(relpath): + if os.path.isabs(relpath) and not ignore_absolute_path_warning: if basics.opt_unsafe_absolute_includes: Debug(DEBUG_WARNING, "absolute filepath '%s' was IGNORED" |