File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 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:
147147
148148 * The specified file path must be absolute, not relative.
149149
150+ * The file may contain comments where the first character of the
151+ line is `'#'`.
152+
150153 Note:
151154
152155 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):
14501450 kind of quoting or escaping.
14511451 """
14521452 values = contents .splitlines ()
1453- return [v .strip () for v in values ]
1453+ return [v .strip () for v in values if not v . startswith ( '#' ) ]
14541454
14551455
14561456def 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):
76857685 self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=@response_file.txt'])
76867686 self.run_process([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=@response_file.json'])
76877687
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+
76887692 def test_dash_s_response_file_misssing(self):
76897693 err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sEXPORTED_FUNCTIONS=@foo'])
76907694 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