diff options
-rw-r--r-- | backends.py | 3 | ||||
-rw-r--r-- | coredata.py | 7 | ||||
-rw-r--r-- | environment.py | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/backends.py b/backends.py index 5049be4..3595f20 100644 --- a/backends.py +++ b/backends.py @@ -861,6 +861,9 @@ class NinjaBackend(Backend): deps = [os.path.join(self.build_to_src, df) \ for df in self.interpreter.get_build_def_files()] + if self.environment.is_cross_build(): + deps.append(os.path.join(self.build_to_src, + self.environment.coredata.cross_file)) elem = NinjaBuildElement('build.ninja', 'REGENERATE_BUILD', deps) elem.write(outfile) diff --git a/coredata.py b/coredata.py index 94a1cda..58c63d0 100644 --- a/coredata.py +++ b/coredata.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import pickle +import pickle, os version = '0.7.0-research' @@ -34,7 +34,10 @@ class CoreData(): self.buildtype = options.buildtype self.strip = options.strip self.coverage = options.coverage - self.cross_file = options.cross_file + if options.cross_file is not None: + self.cross_file = os.path.join(os.getcwd(), options.cross_file) + else: + self.cross_file = None self.compilers = {} self.deps = {} diff --git a/environment.py b/environment.py index 6f8f644..af4e9d9 100644 --- a/environment.py +++ b/environment.py @@ -695,7 +695,7 @@ class Environment(): try: cdf = os.path.join(self.get_build_dir(), Environment.coredata_file) self.coredata = coredata.load(cdf) - except IOError: + except FileNotFoundError: self.coredata = coredata.CoreData(options) if self.coredata.cross_file: self.cross_info = CrossBuildInfo(self.coredata.cross_file) |