summaryrefslogtreecommitdiff
path: root/include_server/compress_files.py
diff options
context:
space:
mode:
authorfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2014-02-27 13:46:06 +0000
committerfergus.henderson@gmail.com <fergus.henderson@gmail.com@01de4be4-8c4a-0410-9132-4925637da917>2014-02-27 13:46:06 +0000
commit103c6bb0d4e6318302a53161746a1a92122d0a6e (patch)
treecdf90b83da54aa3abe7f94ab0f2d578bedd7078f /include_server/compress_files.py
parenta195f2735e782a25bd690d7f19a539bf619676b8 (diff)
downloaddistcc-103c6bb0d4e6318302a53161746a1a92122d0a6e.tar.gz
Apply patch from Rafael Ávila de Espíndola <rafael.espindola@gmail.com>:
1. Add support for -isysroot and -arch. 2. Fix a really nasty corner case: - CompressFiles::Compress uses os.makedirs to create a directory (foo) for one compilation unit - Another compilation unit does the equivalent of '#include "foo/../bar.h"' - The compilation unit uses no other file in foo - We conclude that we don't have to create a dummy foo/forcing_technique_271828 git-svn-id: http://distcc.googlecode.com/svn/trunk@783 01de4be4-8c4a-0410-9132-4925637da917
Diffstat (limited to 'include_server/compress_files.py')
-rwxr-xr-xinclude_server/compress_files.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/include_server/compress_files.py b/include_server/compress_files.py
index c286c6c..20512fd 100755
--- a/include_server/compress_files.py
+++ b/include_server/compress_files.py
@@ -27,7 +27,7 @@ import distcc_pump_c_extensions
class CompressFiles(object):
- def __init__(self, includepath_map, directory_map, realpath_map):
+ def __init__(self, includepath_map, directory_map, realpath_map, mirror_path):
"""Constructor.
Arguments:
@@ -38,10 +38,11 @@ class CompressFiles(object):
self.includepath_map = includepath_map
self.directory_map = directory_map
self.realpath_map = realpath_map
+ self.mirror_path = mirror_path
# The realpath_map indices of files that have been compressed already.
self.files_compressed = set([])
- def Compress(self, include_closure, client_root_keeper):
+ def Compress(self, include_closure, client_root_keeper, currdir_idx):
"""Copy files in include_closure to the client_root directory, compressing
them as we go, and also inserting #line directives.
@@ -77,7 +78,8 @@ class CompressFiles(object):
dirname = os.path.dirname(new_filepath)
try:
if not os.path.isdir(dirname):
- os.makedirs(dirname)
+ my_root = client_root_keeper.client_root
+ self.mirror_path.DoPath(realpath, currdir_idx, my_root)
except (IOError, OSError), why:
# Kill include server
sys.exit("Could not make directory '%s': %s" % (dirname, why))