File tree Expand file tree Collapse file tree 5 files changed +16
-1
lines changed
test cases/common/132 get define Expand file tree Collapse file tree 5 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ These are provided by the `.system()` method call.
168168| openbsd | |
169169| windows | Native Windows (not Cygwin or MSYS2) |
170170| sunos | illumos and Solaris |
171+ | uefi | |
171172
172173Any string not listed above is not guaranteed to remain stable in
173174future releases.
Original file line number Diff line number Diff line change @@ -2366,6 +2366,10 @@ def determine_filenames(self):
23662366 suffix = 'so'
23672367 # Android doesn't support shared_library versioning
23682368 self .filename_tpl = '{0.prefix}{0.name}.{0.suffix}'
2369+ elif self .environment .machines [self .for_machine ].is_uefi ():
2370+ prefix = 'lib'
2371+ suffix = 'lib'
2372+ self .filename_tpl = '{0.prefix}{0.name}.{0.suffix}'
23692373 else :
23702374 prefix = 'lib'
23712375 suffix = 'so'
Original file line number Diff line number Diff line change @@ -366,12 +366,18 @@ def is_irix(self) -> bool:
366366 """Machine is IRIX?"""
367367 return self .system .startswith ('irix' )
368368
369+ def is_uefi (self ) -> bool :
370+ """Machine is UEFI?"""
371+ return self .system == 'uefi'
372+
369373 # Various prefixes and suffixes for import libraries, shared libraries,
370374 # static libraries, and executables.
371375 # Versioning is added to these names in the backends as-needed.
372376 def get_exe_suffix (self ) -> str :
373377 if self .is_windows () or self .is_cygwin ():
374378 return 'exe'
379+ elif self .is_uefi ():
380+ return 'efi'
375381 else :
376382 return ''
377383
@@ -382,7 +388,7 @@ def get_object_suffix(self) -> str:
382388 return 'o'
383389
384390 def libdir_layout_is_win (self ) -> bool :
385- return self .is_windows () or self .is_cygwin ()
391+ return self .is_windows () or self .is_cygwin () or self . is_uefi ()
386392
387393class BinaryTable :
388394
Original file line number Diff line number Diff line change @@ -687,6 +687,9 @@ def is_qnx() -> bool:
687687def is_aix () -> bool :
688688 return platform .system ().lower () == 'aix'
689689
690+ def is_uefi () -> bool :
691+ return platform .system ().lower () == 'uefi'
692+
690693@lru_cache (maxsize = None )
691694def darwin_get_object_archs (objpath : str ) -> 'ImmutableListProtocol[str]' :
692695 '''
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ system_define_map = {
1313 ' openbsd' : [' __OpenBSD__' , ' 1' ],
1414 ' gnu' : [' __GNU__' , ' 1' ],
1515 ' sunos' : [' __sun__' , ' 1' ],
16+ ' uefi' : [' __uefi__' , ' 1' ],
1617
1718 # The __FreeBSD__ define will be equal to the major version of the release
1819 # (ex, in FreeBSD 11.x, __FreeBSD__ == 11). To make the test robust when
You can’t perform that action at this time.
0 commit comments