Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/jsifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ function getTransitiveDeps(symbol) {
}

function shouldPreprocess(fileName) {
return read(fileName).trim().startsWith('#preprocess\n');
var content = read(fileName).trim()
return content.startsWith('#preprocess\n') || content.startsWith('#preprocess\r\n');
}

function preJS() {
Expand Down
1 change: 1 addition & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -14472,6 +14472,7 @@ def test_wasm64_no_asan(self):
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-sMEMORY64', '-fsanitize=address'])
self.assertContained('error: MEMORY64 does not yet work with ASAN', err)

@crossplatform
def test_js_preprocess_pre_post(self):
create_file('pre.js', '''
#preprocess
Expand Down