diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-06-23 07:53:17 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-06-23 17:53:17 +0300 |
commit | 56f7e5c74f54d31b405fe1c4289a406ef826b757 (patch) | |
tree | 2ebe24ae3ca1c62d3d3ebc6275a67a89d2bd34fa /mesonbuild/environment.py | |
parent | d61116efc116845d32cd56b82089addd6b9327cc (diff) | |
download | meson-56f7e5c74f54d31b405fe1c4289a406ef826b757.zip meson-56f7e5c74f54d31b405fe1c4289a406ef826b757.tar.gz meson-56f7e5c74f54d31b405fe1c4289a406ef826b757.tar.bz2 |
coredata: Correctly handle receiving a pipe for native/cross files
* coredata: Correctly handle receiving a pipe for native/cross files
In some cases a cross/native file may be a pipe, such as when using bash
process replacement `meson --native-file
<([binaries]llvm-config='/opt/bin/llvm-config')`, for example. In this
case we copy the contents of the pipe into a file in the meson-private
directory so we can create a proper ninja dependency, and be able to
reload the file on --wipe/--reconfigure. This requires some extra
negotiation to preserve these native/cross files.
Fixes #5505
* run_unitests: Add a unit test for native files that are pipes
Using mkfifo.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 4e2ff92..555c21c 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -403,6 +403,7 @@ class Environment: raise e else: # Just create a fresh coredata in this case + self.scratch_dir = '' self.create_new_coredata(options) ## locally bind some unfrozen configuration @@ -514,7 +515,7 @@ class Environment: # WARNING: Don't use any values from coredata in __init__. It gets # re-initialized with project options by the interpreter during # build file parsing. - self.coredata = coredata.CoreData(options) + self.coredata = coredata.CoreData(options, self.scratch_dir) # Used by the regenchecker script, which runs meson self.coredata.meson_command = mesonlib.meson_command self.first_invocation = True |