aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-11-23 23:16:46 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-12-11 14:54:30 +0530
commit70f39ee21ee632d1e23b8c3cdcd11817818b9495 (patch)
tree00d0b936f3ab989f0e9f5291f730a1756b07de60 /mesonbuild/compilers.py
parent04c1909a4dcc4f92c845eabab5515419f0881dc5 (diff)
downloadmeson-70f39ee21ee632d1e23b8c3cdcd11817818b9495.zip
meson-70f39ee21ee632d1e23b8c3cdcd11817818b9495.tar.gz
meson-70f39ee21ee632d1e23b8c3cdcd11817818b9495.tar.bz2
unity builds: Assembly and LLVM IR are incompatible
Can't just #include them and use them directly in unity builds. Inline assembly is a thing, but it's not trivial and is deprecated with some compilers. Just build them separately and link them in. Ideally the user would then use LTO to ensure the same result.
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 08ebbfb..e474d2e 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -59,6 +59,11 @@ def is_source(fname):
suffix = fname.split('.')[-1]
return suffix in clike_suffixes
+def is_assembly(fname):
+ if hasattr(fname, 'fname'):
+ fname = fname.fname
+ return fname.split('.')[-1].lower() == 's'
+
def is_llvm_ir(fname):
if hasattr(fname, 'fname'):
fname = fname.fname