File tree 3 files changed +8
-1
lines changed 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,9 @@ Options that are modified or new in *emcc* are listed below:
147
147
148
148
* The specified file path must be absolute, not relative.
149
149
150
+ * The file may contain comments where the first character of the
151
+ line is `'#'`.
152
+
150
153
Note:
151
154
152
155
Options can be specified as a single argument with or without a
Original file line number Diff line number Diff line change @@ -1450,7 +1450,7 @@ def parse_symbol_list_file(contents):
1450
1450
kind of quoting or escaping.
1451
1451
"""
1452
1452
values = contents .splitlines ()
1453
- return [v .strip () for v in values ]
1453
+ return [v .strip () for v in values if not v . startswith ( '#' ) ]
1454
1454
1455
1455
1456
1456
def parse_value (text , expected_type ):
Original file line number Diff line number Diff line change @@ -7685,6 +7685,10 @@ def test_dash_s_response_file_list(self):
7685
7685
self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=@response_file.txt'])
7686
7686
self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=@response_file.json'])
7687
7687
7688
+ def test_dash_s_response_file_list_with_comments(self):
7689
+ create_file('response_file.txt', '_main\n#_nope_ish_nope\n_malloc\n')
7690
+ self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=@response_file.txt'])
7691
+
7688
7692
def test_dash_s_response_file_misssing(self):
7689
7693
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=@foo'])
7690
7694
self.assertContained('error: foo: file not found parsing argument: EXPORTED_FUNCTIONS=@foo', err)
You can’t perform that action at this time.
0 commit comments