-
Notifications
You must be signed in to change notification settings - Fork 126
fix: enable ltcg on windows #104
Conversation
refack
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I think the gist is correct.
tools/generate_config_gypi.py
Outdated
| config['variables']['node_with_ltcg'] = 'true' | ||
| with open(out, 'w') as f: | ||
| f.write("{'variables':{'built_with_electron': 1}}\n") | ||
| f.write(repr(config) + "\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I wouldn't use repr, but rather json.dumps...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not json :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right you are...
Lines 1602 to 1603 in 229bd32
| write('config.gypi', do_not_edit + | |
| pprint.pformat(output, indent=2) + '\n') |
...
node/tools/gyp/pylib/gyp/input.py
Lines 240 to 243 in 229bd32
| if check: | |
| build_file_data = CheckedEval(build_file_contents) | |
| else: | |
| build_file_data = eval(build_file_contents, {'__builtins__': None}, |
But still... IMHO repr is less optimal then other options, and json is the most normative format that's compatible with GYP[3] ¯\(ツ)/¯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P.S. nodejs/node#25798
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, i didn't realise that gyp could read json! cool, will update.
|
Apparently this doesn't actually fix the issue according to @miniak |
Ref electron/electron#18670