Skip to content

Commit bd98714

Browse files
authored
Remove fastcomp-only CYBERDWARF option (#11865)
See #11860
1 parent de379ce commit bd98714

File tree

8 files changed

+3
-100
lines changed

8 files changed

+3
-100
lines changed

emcc.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def flush(self, title='js_opts'):
369369
def run_passes(self, passes, title, just_split, just_concat):
370370
global final
371371
passes = ['asm'] + passes
372-
if (self.emit_symbol_map or shared.Settings.CYBERDWARF) and 'minifyNames' in passes:
372+
if self.emit_symbol_map and 'minifyNames' in passes:
373373
passes += ['symbolMap=' + shared.replace_or_append_suffix(self.target, '.symbols')]
374374
if self.profiling_funcs and 'minifyNames' in passes:
375375
passes += ['profilingFuncs']
@@ -929,7 +929,7 @@ def optimizing(opts):
929929
return '-O0' not in opts
930930

931931
def need_llvm_debug_info(options):
932-
return shared.Settings.DEBUG_LEVEL >= 3 or shared.Settings.CYBERDWARF
932+
return shared.Settings.DEBUG_LEVEL >= 3
933933

934934
with ToolchainProfiler.profile_block('parse arguments and setup'):
935935
## Parse args
@@ -2015,13 +2015,6 @@ def include_and_export(name):
20152015
if options.js_opts:
20162016
shared.Settings.RUNNING_JS_OPTS = 1
20172017

2018-
if shared.Settings.CYBERDWARF:
2019-
shared.Settings.DEBUG_LEVEL = max(shared.Settings.DEBUG_LEVEL, 2)
2020-
shared.Settings.BUNDLED_CD_DEBUG_FILE = target + ".cd"
2021-
shared.Settings.SYSTEM_JS_LIBRARIES.append((0, shared.path_from_root('src', 'library_cyberdwarf.js')))
2022-
shared.Settings.SYSTEM_JS_LIBRARIES.append((0, shared.path_from_root('src', 'library_debugger_toolkit.js')))
2023-
newargs.append('-g')
2024-
20252018
if options.tracing:
20262019
cflags.append('-D__EMSCRIPTEN_TRACING__=1')
20272020
if shared.Settings.ALLOW_MEMORY_GROWTH:
@@ -2501,10 +2494,6 @@ def get_final():
25012494
if use_source_map(options):
25022495
shutil.move(wasm_temp + '.map', wasm_source_map_target)
25032496

2504-
if shared.Settings.CYBERDWARF:
2505-
cd_target = final + '.cd'
2506-
shutil.move(cd_target, shared.replace_or_append_suffix(target, '.cd'))
2507-
25082497
# exit block 'emscript'
25092498
log_time('emscript (llvm => executable code)')
25102499

@@ -2742,10 +2731,6 @@ def get_eliminate():
27422731
# src = re.sub(r'\n+[ \n]*\n+', '\n', src)
27432732
# open(final, 'w').write(src)
27442733

2745-
# Bundle symbol data in with the cyberdwarf file
2746-
if shared.Settings.CYBERDWARF:
2747-
run_process([shared.PYTHON, shared.path_from_root('tools', 'emdebug_cd_merger.py'), shared.replace_or_append_suffix(target, '.cd'), shared.replace_or_append_suffix(target, '.symbols')])
2748-
27492734
if use_source_map(options) and not shared.Settings.WASM:
27502735
emit_js_source_maps(target, optimizer.js_transform_tempfiles)
27512736

@@ -3165,7 +3150,6 @@ def do_binaryen(target, asm_target, options, memfile, wasm_binary_target,
31653150
# whether we need to emit -g in the intermediate binaryen invocations (but not necessarily at the very end).
31663151
# this is necessary for emitting a symbol map at the end.
31673152
intermediate_debug_info = bool(debug_info or options.emit_symbol_map or shared.Settings.ASYNCIFY_ONLY or shared.Settings.ASYNCIFY_REMOVE or shared.Settings.ASYNCIFY_ADD)
3168-
emit_symbol_map = options.emit_symbol_map or shared.Settings.CYBERDWARF
31693153
# finish compiling to WebAssembly, using asm2wasm, if we didn't already emit WebAssembly directly using the wasm backend.
31703154
if not shared.Settings.WASM_BACKEND:
31713155
if DEBUG:
@@ -3205,7 +3189,7 @@ def do_binaryen(target, asm_target, options, memfile, wasm_binary_target,
32053189
cmd += ['--enable-threads']
32063190
if intermediate_debug_info:
32073191
cmd += ['-g']
3208-
if emit_symbol_map:
3192+
if options.emit_symbol_map:
32093193
cmd += ['--symbolmap=' + shared.replace_or_append_suffix(target, '.symbols')]
32103194
# we prefer to emit a binary, as it is more efficient. however, when we
32113195
# want full debug info support (not just function names), then we must

emscripten.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,6 @@ def finalize_output(outfile, post, function_table_data, bundled_args, metadata,
441441
if DEBUG:
442442
logger.debug(' emscript: python processing: finalize took %s seconds' % (time.time() - t))
443443

444-
write_cyberdwarf_data(outfile, metadata)
445-
446444

447445
# Given JS code that consists only exactly of a series of "var a = ...;\n var b = ...;" statements,
448446
# this function collapses the redundant 'var ' statements at the beginning of each line to a
@@ -545,16 +543,6 @@ def write_output_file(outfile, post, module):
545543
outfile.write(post)
546544

547545

548-
def write_cyberdwarf_data(outfile, metadata):
549-
if not shared.Settings.CYBERDWARF:
550-
return
551-
552-
assert('cyberdwarf_data' in metadata)
553-
cd_file_name = outfile.name + ".cd"
554-
with open(cd_file_name, 'w') as f:
555-
json.dump({'cyberdwarf': metadata['cyberdwarf_data']}, f)
556-
557-
558546
def create_backend_cmd(infile, temp_js):
559547
"""Create asm.js backend command from settings dict"""
560548
args = [
@@ -595,8 +583,6 @@ def create_backend_cmd(infile, temp_js):
595583
args += ['-emscripten-wasm']
596584
if building.is_wasm_only():
597585
args += ['-emscripten-only-wasm']
598-
if shared.Settings.CYBERDWARF:
599-
args += ['-enable-cyberdwarf']
600586
return args
601587

602588

@@ -655,10 +641,6 @@ def align_static_bump(metadata):
655641
def update_settings_glue(metadata, DEBUG):
656642
optimize_syscalls(metadata['declares'], DEBUG)
657643

658-
if shared.Settings.CYBERDWARF:
659-
shared.Settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE.append("cyberdwarf_Debugger")
660-
shared.Settings.EXPORTED_FUNCTIONS.append("cyberdwarf_Debugger")
661-
662644
# Integrate info from backend
663645
if shared.Settings.SIDE_MODULE:
664646
# we don't need any JS library contents in side modules

src/postamble.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ if (memoryInitializer) {
123123
#endif
124124
#endif // MEM_INIT_IN_WASM == 0
125125

126-
#if CYBERDWARF
127-
Module['cyberdwarf'] = _cyberdwarf_Debugger(cyberDWARFFile);
128-
#endif
129-
130126
var calledRun;
131127

132128
/**

src/preamble.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,6 @@ Module['FS_createDataFile'] = FS.createDataFile;
784784
Module['FS_createPreloadedFile'] = FS.createPreloadedFile;
785785
#endif
786786

787-
#if CYBERDWARF
788-
var cyberDWARFFile = '{{{ BUNDLED_CD_DEBUG_FILE }}}';
789-
#endif
790-
791787
#include "URIUtils.js"
792788

793789
#if ASSERTIONS

src/settings.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,14 +1461,6 @@ var ELIMINATE_DUPLICATE_FUNCTIONS_PASSES = 5;
14611461
// the ctors.
14621462
var EVAL_CTORS = 0;
14631463

1464-
// see http://kripken.github.io/emscripten-site/docs/debugging/CyberDWARF.html
1465-
// [fastcomp-only]
1466-
var CYBERDWARF = 0;
1467-
1468-
// Path to the CyberDWARF debug file passed to the compiler
1469-
// [fastcomp-only]
1470-
var BUNDLED_CD_DEBUG_FILE = "";
1471-
14721464
// Is enabled, use the JavaScript TextDecoder API for string marshalling.
14731465
// Enabled by default, set this to 0 to disable.
14741466
// If set to 2, we assume TextDecoder is present and usable, and do not emit

tests/test_other.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7123,18 +7123,6 @@ def test_function_eliminator_replace_variable_value_with_hash_info(self):
71237123
'test-function-eliminator-replace-variable-value-output.js',
71247124
use_hash_info=True)
71257125

7126-
@no_wasm_backend('uses CYBERDWARF')
7127-
def test_cyberdwarf_pointers(self):
7128-
self.run_process([EMCC, path_from_root('tests', 'debugger', 'test_pointers.cpp'), '-Oz', '-s', 'CYBERDWARF=1',
7129-
'--pre-js', path_from_root('tests', 'debugger', 'test_preamble.js'), '-o', 'test_pointers.js'])
7130-
self.run_js('test_pointers.js')
7131-
7132-
@no_wasm_backend('uses CYBERDWARF')
7133-
def test_cyberdwarf_union(self):
7134-
self.run_process([EMCC, path_from_root('tests', 'debugger', 'test_union.cpp'), '-Oz', '-s', 'CYBERDWARF=1',
7135-
'--pre-js', path_from_root('tests', 'debugger', 'test_preamble.js'), '-o', 'test_union.js'])
7136-
self.run_js('test_union.js')
7137-
71387126
def test_source_file_with_fixed_language_mode(self):
71397127
create_test_file('src_tmp_fixed_lang', '''
71407128
#include <string>

tools/emdebug_cd_merger.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

tools/shared.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,9 +1100,6 @@ def verify_settings():
11001100
# Requesting both Wasm and Wasm2JS support
11011101
Settings.WASM2JS = 1
11021102

1103-
if Settings.CYBERDWARF:
1104-
exit_with_error('emcc: CYBERDWARF is not supported by the LLVM wasm backend')
1105-
11061103

11071104
def print_compiler_stage(cmd):
11081105
"""Emulate the '-v' of clang/gcc by printing the name of the sub-command

0 commit comments

Comments
 (0)