Skip to content

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jul 17, 2019

No description provided.

Copy link
Contributor

@jgravelle-google jgravelle-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot, mostly lgtm

}''')
run_process([PYTHON, EMCC, 'src.c', '-s', 'NO_FILESYSTEM=1'])

def test_dashS(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: could be dash_S to match has_dash_S? test_dashS_stdout looks like it's mixing camel and snake case to me, the underscore makes that less odd I feel.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just mimicking the test_dashE_xx and test_dash_M_xxx tests below.

Copy link
Member

@quantum5 quantum5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine if we don't care about .bc file generation.

emcc.py Outdated
has_dash_S = '-S' in newargs
if has_dash_c:
assert has_source_inputs or has_header_inputs, 'Must have source code or header inputs to use -c'
target = target_basename + '.o'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want a if '-emit-llvm' in newargs here as well to generate a .bc file?

emcc.py Outdated
target = target_basename + '.o'
final_suffix = '.o'
elif has_dash_S:
if '-emit-llvm' in newargs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's worth checking for -emit-llvm - if we do that, we may also want to check -flto and WASM_OBJECT_FILES=0 as those also affect whether we emit bitcode. But I think it might be overkill to do all that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all for the default output filename if otherwise unspecified by the user, right? So letting this be best-effort is probably good enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of WASM_OBJECT_FILES or flto settings -emit-llvm will always generate bitcode output from clang, and this is already supported in way since we pass this through from the command line.

Or are you saying the -emit-llvm might not have come from the user? .. I'll check that.

@sbc100 sbc100 merged commit 6eb264b into incoming Jul 17, 2019
@sbc100 sbc100 deleted the support_dash_s branch July 17, 2019 23:15
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants