Reenable bullet with debug info (#14279)
Now that we have fixed #14255, This reenables bullet test with debug info enabled.
This commit is contained in:
Родитель
4eede0009d
Коммит
e998705dbd
|
@ -6145,10 +6145,6 @@ void* operator new(size_t size) {
|
|||
})
|
||||
# Called thus so it runs late in the alphabetical cycle... it is long
|
||||
def test_bullet(self, use_cmake):
|
||||
if not use_cmake:
|
||||
# Temporarily disabled
|
||||
self.skipTest('https://github.com/emscripten-core/emscripten/issues/14255')
|
||||
|
||||
if WINDOWS and not use_cmake:
|
||||
self.skipTest("Windows cannot run configure sh scripts")
|
||||
|
||||
|
|
|
@ -45,8 +45,7 @@ def get(ports, settings, shared):
|
|||
for dir in dirs:
|
||||
includes.append(os.path.join(root, dir))
|
||||
|
||||
# Debug info temporarly disabled due to: https://github.com/emscripten-core/emscripten/issues/14255
|
||||
ports.build_port(src_path, final, includes=includes, exclude_dirs=['MiniCL'], debug_info=False)
|
||||
ports.build_port(src_path, final, includes=includes, exclude_dirs=['MiniCL'])
|
||||
|
||||
return [shared.Cache.get_lib('libbullet.a', create)]
|
||||
|
||||
|
|
|
@ -84,8 +84,7 @@ def get(ports, settings, shared):
|
|||
commands.append([shared.EMCC, '-c', src, '-O2', '-o', obj, '-w'] + flags)
|
||||
objects.append(obj)
|
||||
|
||||
# Debug info temporarly disabled due to: https://github.com/emscripten-core/emscripten/issues/14255
|
||||
ports.run_commands(commands, debug_info=False)
|
||||
ports.run_commands(commands)
|
||||
ports.create_lib(output_path, objects)
|
||||
|
||||
# copy header to a location so it can be used as 'MPG123/'
|
||||
|
|
|
@ -56,12 +56,10 @@ def dir_is_newer(dir_a, dir_b):
|
|||
return newest_a < newest_b
|
||||
|
||||
|
||||
def get_base_cflags(force_object_files=False, debug_info=True):
|
||||
def get_base_cflags(force_object_files=False):
|
||||
# Always build system libraries with debug information. Non-debug builds
|
||||
# will ignore this at link time because we link with `-strip-debug`.
|
||||
flags = []
|
||||
if debug_info:
|
||||
flags.append('-g')
|
||||
flags = ['-g']
|
||||
if settings.LTO and not force_object_files:
|
||||
flags += ['-flto=' + settings.LTO]
|
||||
if settings.RELOCATABLE:
|
||||
|
@ -1638,7 +1636,7 @@ class Ports:
|
|||
shutil.copyfile(f, os.path.join(dest, os.path.basename(f)))
|
||||
|
||||
@staticmethod
|
||||
def build_port(src_path, output_path, includes=[], flags=[], exclude_files=[], exclude_dirs=[], debug_info=True):
|
||||
def build_port(src_path, output_path, includes=[], flags=[], exclude_files=[], exclude_dirs=[]):
|
||||
srcs = []
|
||||
for root, dirs, files in os.walk(src_path, topdown=False):
|
||||
if any((excluded in root) for excluded in exclude_dirs):
|
||||
|
@ -1658,19 +1656,19 @@ class Ports:
|
|||
commands.append([shared.EMCC, '-c', src, '-O2', '-o', obj, '-w'] + include_commands + flags)
|
||||
objects.append(obj)
|
||||
|
||||
Ports.run_commands(commands, debug_info=debug_info)
|
||||
Ports.run_commands(commands)
|
||||
create_lib(output_path, objects)
|
||||
return output_path
|
||||
|
||||
@staticmethod
|
||||
def run_commands(commands, debug_info=True):
|
||||
def run_commands(commands):
|
||||
# Runs a sequence of compiler commands, adding importand cflags as defined by get_cflags() so
|
||||
# that the ports are built in the correct configuration.
|
||||
def add_args(cmd):
|
||||
# this must only be called on a standard build command
|
||||
assert cmd[0] in (shared.EMCC, shared.EMXX)
|
||||
# add standard cflags, but also allow the cmd to override them
|
||||
return cmd[:1] + get_base_cflags(debug_info=debug_info) + cmd[1:]
|
||||
return cmd[:1] + get_base_cflags() + cmd[1:]
|
||||
run_build_commands([add_args(c) for c in commands])
|
||||
|
||||
@staticmethod
|
||||
|
|
Загрузка…
Ссылка в новой задаче