aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 702b338..e8aa8f4 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -722,9 +722,12 @@ class BuildTarget(Target):
def extract_objects(self, srclist):
obj_src = []
for src in srclist:
- if not isinstance(src, str):
- raise MesonException('Object extraction arguments must be strings.')
- src = File(False, self.subdir, src)
+ if isinstance(src, str):
+ src = File(False, self.subdir, src)
+ elif isinstance(src, File):
+ FeatureNew('File argument for extract_objects', '0.50.0').use(self.subproject)
+ else:
+ raise MesonException('Object extraction arguments must be strings or Files.')
# FIXME: It could be a generated source
if src not in self.sources:
raise MesonException('Tried to extract unknown source %s.' % src)