Skip to content

Commit 6e30b56

Browse files
committed
---
yaml --- r: 318974 b: refs/heads/master-rebranch c: e04e7fe h: refs/heads/master
1 parent 86bb989 commit 6e30b56

File tree

7 files changed

+27
-52
lines changed

7 files changed

+27
-52
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,4 +1457,4 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14571457
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14581458
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14591459
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1460-
refs/heads/master-rebranch: a9cae779f444a8ea3156b6562a309af954ed01f4
1460+
refs/heads/master-rebranch: e04e7fe03c15a1768406a45f5c42ae0f5e3aec97

branches/master-rebranch/lib/Frontend/ParseableInterfaceModuleLoader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ class swift::ParseableInterfaceBuilder {
520520
return;
521521
}
522522

523+
// Optimize emitted modules. This has to happen after we parse arguments,
524+
// because parseSILOpts would override the current optimization mode.
525+
subInvocation.getSILOptions().OptMode = OptimizationMode::ForSpeed;
526+
523527
// Build the .swiftmodule; this is a _very_ abridged version of the logic
524528
// in performCompile in libFrontendTool, specialized, to just the one
525529
// module-serialization task we're trying to do here.

branches/master-rebranch/test/ParseableInterface/optimization-level.swift

Lines changed: 0 additions & 16 deletions
This file was deleted.

branches/master-rebranch/test/SourceKit/InterfaceGen/gen_swift_module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ func f(s : inout [Int]) {
3030
// Test we can generate the interface of a module loaded via a .swiftinterface file correctly
3131

3232
// RUN: %empty-directory(%t.mod)
33-
// RUN: %swift -emit-module -o /dev/null -emit-parseable-module-interface-path %t.mod/swift_mod.swiftinterface -O %S/Inputs/swift_mod.swift -parse-as-library
33+
// RUN: %swift -emit-module -o /dev/null -emit-parseable-module-interface-path %t.mod/swift_mod.swiftinterface %S/Inputs/swift_mod.swift -parse-as-library
3434
// RUN: %sourcekitd-test -req=interface-gen -module swift_mod -- -I %t.mod -module-cache-path %t.mod/mcp > %t.response
3535
// RUN: diff -u %s.from_swiftinterface.response %t.response

branches/master-rebranch/utils/build-parser-lib

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,6 @@ from swift_build_support.swift_build_support.toolchain import host_toolchain
4242

4343
isMac = platform.system() == 'Darwin'
4444

45-
def call_without_sleeping(command, env=None, dry_run=False, echo=False):
46-
"""
47-
Execute a command during which system sleep is disabled.
48-
49-
By default, this ignores the state of the `shell.dry_run` flag.
50-
"""
51-
52-
# Disable system sleep, if possible.
53-
if platform.system() == 'Darwin':
54-
# Don't mutate the caller's copy of the arguments.
55-
command = ["caffeinate"] + list(command)
56-
57-
shell.call(command, env=env, dry_run=dry_run, echo=echo)
58-
5945
class Builder(object):
6046
def __init__(self, toolchain, args):
6147
self.toolchain = toolchain
@@ -76,7 +62,7 @@ class Builder(object):
7662

7763
def call(self, command, env=None, without_sleeping=False):
7864
if without_sleeping:
79-
call_without_sleeping(command, env=env, dry_run=self.dry_run, echo=self.verbose)
65+
shell.call_without_sleeping(command, env=env, dry_run=self.dry_run, echo=self.verbose)
8066
else:
8167
shell.call(command, env=env, dry_run=self.dry_run, echo=self.verbose)
8268

branches/master-rebranch/utils/build-script

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,6 @@ def exit_rejecting_arguments(message, parser=None):
5656
sys.exit(2) # 2 is the same as `argparse` error exit code.
5757

5858

59-
def call_without_sleeping(command, env=None, dry_run=False, echo=False):
60-
"""
61-
Execute a command during which system sleep is disabled.
62-
63-
By default, this ignores the state of the `shell.dry_run` flag.
64-
"""
65-
66-
# Disable system sleep, if possible.
67-
if platform.system() == 'Darwin':
68-
# Don't mutate the caller's copy of the arguments.
69-
command = ["caffeinate"] + list(command)
70-
71-
shell.call(command, env=env, dry_run=dry_run, echo=echo)
72-
73-
7459
class HostSpecificConfiguration(object):
7560

7661
"""Configuration information for an individual host."""
@@ -906,8 +891,8 @@ class BuildScriptInvocation(object):
906891
# `build-script-impl`.
907892
if self.args.legacy_impl:
908893
# Execute the underlying build script implementation.
909-
call_without_sleeping([build_script_impl] + impl_args,
910-
env=impl_env, echo=True)
894+
shell.call_without_sleeping([build_script_impl] + impl_args,
895+
env=impl_env, echo=True)
911896
return
912897

913898
# Otherwise, we compute and execute the individual actions ourselves.
@@ -924,7 +909,7 @@ class BuildScriptInvocation(object):
924909
assert name is not None, "invalid action"
925910
action_name = "{}-{}-{}".format(
926911
host.name, product_class.product_name(), name)
927-
call_without_sleeping(
912+
shell.call_without_sleeping(
928913
[build_script_impl] + impl_args + [
929914
"--only-execute", action_name],
930915
env=impl_env, echo=self.args.verbose_build)
@@ -1143,7 +1128,7 @@ def main_preset():
11431128
if args.expand_build_script_invocation:
11441129
return 0
11451130

1146-
call_without_sleeping(build_script_args)
1131+
shell.call_without_sleeping(build_script_args)
11471132
return 0
11481133

11491134

branches/master-rebranch/utils/swift_build_support/swift_build_support/shell.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import os
1919
import pipes
20+
import platform
2021
import shutil
2122
import subprocess
2223
import sys
@@ -93,6 +94,21 @@ def call(command, stderr=None, env=None, dry_run=None, echo=True):
9394
"': " + e.strerror)
9495

9596

97+
def call_without_sleeping(command, env=None, dry_run=False, echo=False):
98+
"""
99+
Execute a command during which system sleep is disabled.
100+
101+
By default, this ignores the state of the `shell.dry_run` flag.
102+
"""
103+
104+
# Disable system sleep, if possible.
105+
if platform.system() == 'Darwin':
106+
# Don't mutate the caller's copy of the arguments.
107+
command = ["caffeinate"] + list(command)
108+
109+
call(command, env=env, dry_run=dry_run, echo=echo)
110+
111+
96112
def capture(command, stderr=None, env=None, dry_run=None, echo=True,
97113
optional=False, allow_non_zero_exit=False):
98114
"""

0 commit comments

Comments
 (0)