Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only build embedded.cc when under Windows. #11

Merged
merged 1 commit into from
Jan 5, 2024
Merged
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
21 changes: 19 additions & 2 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,14 @@
'<(mksnapshot_exec)',
],
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
# snapshot.cc is always built in the 'asm_to_inline_asm' step.
'<(INTERMEDIATE_DIR)/embedded.S',
],
'conditions': [
# When not under Windows, embedded.S will be compiled directly.
['OS != "win"', {
'process_outputs_as_sources': 1,
}],
['v8_random_seed', {
'variables': {
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
Expand Down Expand Up @@ -450,14 +454,27 @@
],
},
{
# This action is only useful on Windows.
# Under non-Windows systems, we effectively ignore
# the output of this action.
'action_name': 'asm_to_inline_asm',
'message': 'generating: >@(_outputs)',
'inputs': [
'<(INTERMEDIATE_DIR)/embedded.S',
],
'outputs': [
'conditions': [
# Under Windows, we need to generate snapshot.cc and embedded.cc.
['OS == "win"', {
'outputs': [
'<(INTERMEDIATE_DIR)/snapshot.cc',
'<(INTERMEDIATE_DIR)/embedded.cc',
],
}],
# Under non-Windows systems, we effectively ignore the output of this
# action. We do need to build snapshot.cc, however.
['OS != "win"', {
'outputs': ['<(INTERMEDIATE_DIR)/snapshot.cc']
}],
],
'process_outputs_as_sources': 1,
'action': [
Expand Down