Skip to content

Commit d02668a

Browse files
authored
Sort members of EmccOptions. NFC (#25687)
Also, use class variables instead of instance fields. This doesn't change the semantics (at least not the way we use this class) and it saves a little bit of visual noise.
1 parent a4b0901 commit d02668a

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed

tools/cmdline.py

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import sys
1212
from enum import Enum, auto, unique
1313
from subprocess import PIPE
14+
from typing import List, Set
1415

1516
from tools import (
1617
cache,
@@ -60,59 +61,58 @@ class OFormat(Enum):
6061

6162

6263
class EmccOptions:
63-
def __init__(self):
64-
self.target = ''
65-
self.output_file = None
66-
self.input_files = []
67-
self.no_minify = False
68-
self.post_link = False
69-
self.save_temps = False
70-
self.executable = False
71-
self.oformat = None
72-
self.requested_debug = None
73-
self.emit_symbol_map = False
74-
self.use_closure_compiler = None
75-
self.js_transform = None
76-
self.pre_js = [] # before all js
77-
self.post_js = [] # after all js
78-
self.extern_pre_js = [] # before all js, external to optimized code
79-
self.extern_post_js = [] # after all js, external to optimized code
80-
self.preload_files = []
81-
self.embed_files = []
82-
self.exclude_files = []
83-
self.ignore_dynamic_linking = False
84-
self.shell_path = None
85-
self.source_map_base = ''
86-
self.emit_tsd = ''
87-
self.emrun = False
88-
self.cpu_profiler = False
89-
self.memory_profiler = False
90-
self.use_preload_cache = False
91-
self.use_preload_plugins = False
92-
self.valid_abspaths = []
93-
# Specifies the line ending format to use for all generated text files.
94-
# Defaults to using the native EOL on each platform (\r\n on Windows, \n on
95-
# Linux & MacOS)
96-
self.output_eol = os.linesep
97-
self.no_entry = False
98-
self.shared = False
99-
self.relocatable = False
100-
self.reproduce = None
101-
self.syntax_only = False
102-
self.dash_c = False
103-
self.dash_E = False
104-
self.dash_S = False
105-
self.dash_M = False
106-
self.input_language = None
107-
self.nostdlib = False
108-
self.nostdlibxx = False
109-
self.nodefaultlibs = False
110-
self.nolibc = False
111-
self.nostartfiles = False
112-
self.sanitize_minimal_runtime = False
113-
self.sanitize = set()
114-
self.lib_dirs = []
115-
self.fast_math = False
64+
cpu_profiler = False
65+
dash_E = False
66+
dash_M = False
67+
dash_S = False
68+
dash_c = False
69+
embed_files: List[str] = []
70+
emit_symbol_map = False
71+
emit_tsd = ''
72+
emrun = False
73+
exclude_files: List[str] = []
74+
executable = False
75+
extern_post_js: List[str] = [] # after all js, external to optimized code
76+
extern_pre_js: List[str] = [] # before all js, external to optimized code
77+
fast_math = False
78+
ignore_dynamic_linking = False
79+
input_files: List[str] = []
80+
input_language = None
81+
js_transform = None
82+
lib_dirs: List[str] = []
83+
memory_profiler = False
84+
no_entry = False
85+
no_minify = False
86+
nodefaultlibs = False
87+
nolibc = False
88+
nostartfiles = False
89+
nostdlib = False
90+
nostdlibxx = False
91+
oformat = None
92+
# Specifies the line ending format to use for all generated text files.
93+
# Defaults to using the native EOL on each platform (\r\n on Windows, \n on
94+
# Linux & MacOS)
95+
output_eol = os.linesep
96+
output_file = None
97+
post_js: List[str] = [] # after all js
98+
post_link = False
99+
pre_js: List[str] = [] # before all js
100+
preload_files: List[str] = []
101+
relocatable = False
102+
reproduce = None
103+
requested_debug = None
104+
sanitize: Set[str] = set()
105+
sanitize_minimal_runtime = False
106+
save_temps = False
107+
shared = False
108+
shell_path = None
109+
source_map_base = ''
110+
syntax_only = False
111+
target = ''
112+
use_closure_compiler = None
113+
use_preload_cache = False
114+
use_preload_plugins = False
115+
valid_abspaths: List[str] = []
116116

117117

118118
def is_int(s):

0 commit comments

Comments
 (0)