SCons: Remove references to obsolete "fat" bits

This commit is contained in:
Rémi Verschelde 2018-02-19 23:39:56 +01:00
parent 3e6f2b7d98
commit 1602e0cdb9
3 changed files with 17 additions and 67 deletions

View file

@ -145,7 +145,7 @@ opts = Variables(customs, ARGUMENTS)
# Target build options
opts.Add('arch', "Platform-dependent architecture (arm/arm64/x86/x64/mips/etc)", '')
opts.Add(EnumVariable('bits', "Target platform bits", 'default', ('default', '32', '64', 'fat')))
opts.Add(EnumVariable('bits', "Target platform bits", 'default', ('default', '32', '64')))
opts.Add('p', "Platform (alias for 'platform')", '')
opts.Add('platform', "Target platform (%s)" % ('|'.join(platform_list), ), '')
opts.Add(EnumVariable('target', "Compilation target", 'debug', ('debug', 'release_debug', 'release')))
@ -382,8 +382,6 @@ if selected_platform in platform_list:
suffix += ".32"
elif (env["bits"] == "64"):
suffix += ".64"
elif (env["bits"] == "fat"):
suffix += ".fat"
suffix += env.extra_suffix

View file

@ -254,7 +254,6 @@ env_libvpx = env.Clone()
env_libvpx.Append(CPPPATH=[libvpx_dir])
cpu_bits = env["bits"]
osx_fat = (env["platform"] == 'osx' and cpu_bits == 'fat')
webm_cpu_x86 = False
webm_cpu_arm = False
if env["platform"] == 'uwp':
@ -269,9 +268,6 @@ else:
is_android_x86 = (env["platform"] == 'android' and env["android_arch"] == 'x86')
if is_android_x86:
cpu_bits = '32'
if osx_fat:
webm_cpu_x86 = True
else:
webm_cpu_x86 = not is_x11_or_server_arm and (cpu_bits == '32' or cpu_bits == '64') and (env["platform"] == 'windows' or env["platform"] == 'x11' or env["platform"] == 'osx' or env["platform"] == 'haiku' or is_android_x86 or is_ios_x86)
webm_cpu_arm = is_x11_or_server_arm or (not is_ios_x86 and env["platform"] == 'iphone') or (not is_android_x86 and env["platform"] == 'android')
@ -303,12 +299,6 @@ if webm_cpu_x86:
webm_simd_optimizations = False
if webm_cpu_x86:
if osx_fat:
#'osx' platform only: run python script which will compile using 'yasm' command and then merge 32-bit and 64-bit using 'lipo' command
env_libvpx["AS"] = 'python modules/webm/libvpx/yasm_osx_fat.py'
env_libvpx["ASFLAGS"] = '-I' + libvpx_dir[1:]
env_libvpx["ASCOM"] = '$AS $ASFLAGS $TARGET $SOURCES'
else:
if env["platform"] == 'windows' or env["platform"] == 'uwp':
env_libvpx["ASFORMAT"] = 'win'
elif env["platform"] == 'osx' or env["platform"] == "iphone":
@ -375,7 +365,7 @@ if webm_cpu_x86:
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_intrin_x86)
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_x86asm)
if cpu_bits == '64' or osx_fat:
if cpu_bits == '64':
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_x86_64asm)
elif webm_cpu_arm:
env_libvpx.add_source_files(env.modules_sources, libvpx_sources_arm)

View file

@ -1,38 +0,0 @@
#!/usr/bin/env python
import sys
import os
includes = sys.argv[1]
output_file = sys.argv[2]
input_file = sys.argv[3]
can_remove = {}
lipo_command = ''
exit_code = 1
for arch in ['32', '64']:
if arch == '32' and input_file.endswith('x86_64.asm'):
can_remove[arch] = False
else:
command = 'yasm ' + includes + ' -f macho' + arch + ' -D X86_' + arch + ' -o ' + output_file + '.' + arch + ' ' + input_file
print(command)
if os.system(command) == 0:
lipo_command += output_file + '.' + arch + ' '
can_remove[arch] = True
else:
can_remove[arch] = False
if lipo_command != '':
lipo_command = 'lipo -create ' + lipo_command + '-output ' + output_file
print(lipo_command)
if os.system(lipo_command) == 0:
exit_code = 0
for arch in ['32', '64']:
if can_remove[arch]:
os.remove(output_file + '.' + arch)
sys.exit(exit_code)