summaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorKO Myung-Hun <komh@chollian.net>2023-11-08 22:08:54 +0900
committerDylan Baker <dylan@pnwbakers.com>2025-11-14 08:16:23 -0800
commit9d26b9713931ffe67c1b7ec79eb1e8c03839fd89 (patch)
tree077682f75e750557d8bbe3bcda3d82ff68bb7af3 /mesonbuild/build.py
parent6b87395b15a16a353ca28ad641dc7ff71de5f1e6 (diff)
downloadmeson-9d26b9713931ffe67c1b7ec79eb1e8c03839fd89.tar.gz
Add `os2_emxomf' option to generate OMF files on OS/2
1. Generate OMF objs with `-Zomf' compiler flags 2. Generate OMF libs with `.lib' suffix using `emxomfar' as a librarian
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 2a095b022..90cb4666d 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2369,6 +2369,8 @@ class StaticLibrary(BuildTarget):
suffix = 'rlib'
elif self.rust_crate_type == 'staticlib':
suffix = 'a'
+ elif self.environment.machines[self.for_machine].is_os2() and self.environment.coredata.optstore.get_value_for(OptionKey('os2_emxomf')):
+ suffix = 'lib'
else:
suffix = 'a'
if 'c' in self.compilers and self.compilers['c'].get_id() == 'tasking' and not self.prelink:
@@ -2559,8 +2561,9 @@ class SharedLibrary(BuildTarget):
# Shared library is of the form foo.dll
prefix = prefix if prefix is not None else ''
suffix = suffix if suffix is not None else 'dll'
- # Import library is called foo_dll.a
- import_suffix = import_suffix if import_suffix is not None else '_dll.a'
+ # Import library is called foo_dll.a or foo_dll.lib
+ if import_suffix is None:
+ import_suffix = '_dll.lib' if self.environment.coredata.optstore.get_value_for(OptionKey('os2_emxomf')) else '_dll.a'
import_filename_tpl = '{0.prefix}{0.name}' + import_suffix
filename_tpl = '{0.shortname}' if self.shortname else '{0.prefix}{0.name}'
if self.soversion: