Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1df165ea
Unverified
Commit
1df165ea
authored
Aug 16, 2019
by
Jonah Williams
Committed by
GitHub
Aug 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename iOS arch for macOS release mode (macOS release mode 2 of 3) (#38645)
parent
9823b3db
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
54 deletions
+62
-54
build.dart
packages/flutter_tools/lib/src/base/build.dart
+20
-15
build_info.dart
packages/flutter_tools/lib/src/build_info.dart
+13
-10
ios.dart
packages/flutter_tools/lib/src/build_system/targets/ios.dart
+8
-8
build_aot.dart
packages/flutter_tools/lib/src/commands/build_aot.dart
+10
-10
devices.dart
packages/flutter_tools/lib/src/ios/devices.dart
+1
-1
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+2
-2
build_test.dart
...ges/flutter_tools/test/general.shard/base/build_test.dart
+6
-6
dart_test.dart
...ls/test/general.shard/build_system/targets/dart_test.dart
+2
-2
No files found.
packages/flutter_tools/lib/src/base/build.dart
View file @
1df165ea
...
@@ -46,7 +46,7 @@ class GenSnapshot {
...
@@ -46,7 +46,7 @@ class GenSnapshot {
Future
<
int
>
run
({
Future
<
int
>
run
({
@required
SnapshotType
snapshotType
,
@required
SnapshotType
snapshotType
,
IOSArch
ios
Arch
,
DarwinArch
darwin
Arch
,
Iterable
<
String
>
additionalArgs
=
const
<
String
>[],
Iterable
<
String
>
additionalArgs
=
const
<
String
>[],
})
{
})
{
final
List
<
String
>
args
=
<
String
>[
final
List
<
String
>
args
=
<
String
>[
...
@@ -59,7 +59,7 @@ class GenSnapshot {
...
@@ -59,7 +59,7 @@ class GenSnapshot {
// iOS has a separate gen_snapshot for armv7 and arm64 in the same,
// iOS has a separate gen_snapshot for armv7 and arm64 in the same,
// directory. So we need to select the right one.
// directory. So we need to select the right one.
if
(
snapshotType
.
platform
==
TargetPlatform
.
ios
)
{
if
(
snapshotType
.
platform
==
TargetPlatform
.
ios
)
{
snapshotterPath
+=
'_'
+
getNameFor
IOSArch
(
ios
Arch
);
snapshotterPath
+=
'_'
+
getNameFor
DarwinArch
(
darwin
Arch
);
}
}
StringConverter
outputFilter
;
StringConverter
outputFilter
;
...
@@ -89,7 +89,7 @@ class AOTSnapshotter {
...
@@ -89,7 +89,7 @@ class AOTSnapshotter {
@required
String
mainPath
,
@required
String
mainPath
,
@required
String
packagesPath
,
@required
String
packagesPath
,
@required
String
outputPath
,
@required
String
outputPath
,
IOSArch
ios
Arch
,
DarwinArch
darwin
Arch
,
List
<
String
>
extraGenSnapshotOptions
=
const
<
String
>[],
List
<
String
>
extraGenSnapshotOptions
=
const
<
String
>[],
@required
bool
bitcode
,
@required
bool
bitcode
,
})
async
{
})
async
{
...
@@ -103,7 +103,7 @@ class AOTSnapshotter {
...
@@ -103,7 +103,7 @@ class AOTSnapshotter {
return
1
;
return
1
;
}
}
// TODO(cbracken): replace IOSArch with TargetPlatform.ios_{armv7,arm64}.
// TODO(cbracken): replace IOSArch with TargetPlatform.ios_{armv7,arm64}.
assert
(
platform
!=
TargetPlatform
.
ios
||
ios
Arch
!=
null
);
assert
(
platform
!=
TargetPlatform
.
ios
||
darwin
Arch
!=
null
);
final
PackageMap
packageMap
=
PackageMap
(
packagesPath
);
final
PackageMap
packageMap
=
PackageMap
(
packagesPath
);
final
String
packageMapError
=
packageMap
.
checkValid
();
final
String
packageMapError
=
packageMap
.
checkValid
();
...
@@ -130,7 +130,7 @@ class AOTSnapshotter {
...
@@ -130,7 +130,7 @@ class AOTSnapshotter {
}
}
final
String
assembly
=
fs
.
path
.
join
(
outputDir
.
path
,
'snapshot_assembly.S'
);
final
String
assembly
=
fs
.
path
.
join
(
outputDir
.
path
,
'snapshot_assembly.S'
);
if
(
platform
==
TargetPlatform
.
ios
)
{
if
(
platform
==
TargetPlatform
.
ios
||
platform
==
TargetPlatform
.
darwin_x64
)
{
// Assembly AOT snapshot.
// Assembly AOT snapshot.
outputPaths
.
add
(
assembly
);
outputPaths
.
add
(
assembly
);
genSnapshotArgs
.
add
(
'--snapshot_kind=app-aot-assembly'
);
genSnapshotArgs
.
add
(
'--snapshot_kind=app-aot-assembly'
);
...
@@ -143,7 +143,7 @@ class AOTSnapshotter {
...
@@ -143,7 +143,7 @@ class AOTSnapshotter {
genSnapshotArgs
.
add
(
'--strip'
);
genSnapshotArgs
.
add
(
'--strip'
);
}
}
if
(
platform
==
TargetPlatform
.
android_arm
||
iosArch
==
IOS
Arch
.
armv7
)
{
if
(
platform
==
TargetPlatform
.
android_arm
||
darwinArch
==
Darwin
Arch
.
armv7
)
{
// Use softfp for Android armv7 devices.
// Use softfp for Android armv7 devices.
// This is the default for armv7 iOS builds, but harmless to set.
// This is the default for armv7 iOS builds, but harmless to set.
// TODO(cbracken): eliminate this when we fix https://github.com/flutter/flutter/issues/17489
// TODO(cbracken): eliminate this when we fix https://github.com/flutter/flutter/issues/17489
...
@@ -168,7 +168,7 @@ class AOTSnapshotter {
...
@@ -168,7 +168,7 @@ class AOTSnapshotter {
()
=>
genSnapshot
.
run
(
()
=>
genSnapshot
.
run
(
snapshotType:
snapshotType
,
snapshotType:
snapshotType
,
additionalArgs:
genSnapshotArgs
,
additionalArgs:
genSnapshotArgs
,
iosArch:
ios
Arch
,
darwinArch:
darwin
Arch
,
));
));
if
(
genSnapshotExitCode
!=
0
)
{
if
(
genSnapshotExitCode
!=
0
)
{
printError
(
'Dart snapshot generator failed with exit code
$genSnapshotExitCode
'
);
printError
(
'Dart snapshot generator failed with exit code
$genSnapshotExitCode
'
);
...
@@ -197,9 +197,9 @@ class AOTSnapshotter {
...
@@ -197,9 +197,9 @@ class AOTSnapshotter {
// On iOS, we use Xcode to compile the snapshot into a dynamic library that the
// On iOS, we use Xcode to compile the snapshot into a dynamic library that the
// end-developer can link into their app.
// end-developer can link into their app.
if
(
platform
==
TargetPlatform
.
ios
)
{
if
(
platform
==
TargetPlatform
.
ios
||
platform
==
TargetPlatform
.
darwin_x64
)
{
final
RunResult
result
=
await
_build
Ios
Framework
(
final
RunResult
result
=
await
_buildFramework
(
iosArch:
ios
Arch
,
appleArch:
darwin
Arch
,
assemblyPath:
bitcode
?
'
$assembly
.bitcode'
:
assembly
,
assemblyPath:
bitcode
?
'
$assembly
.bitcode'
:
assembly
,
outputPath:
outputDir
.
path
,
outputPath:
outputDir
.
path
,
bitcode:
bitcode
,
bitcode:
bitcode
,
...
@@ -210,17 +210,21 @@ class AOTSnapshotter {
...
@@ -210,17 +210,21 @@ class AOTSnapshotter {
return
0
;
return
0
;
}
}
/// Builds an iOS framework at [outputPath]/App.framework from the assembly
/// Builds an iOS
or macOS
framework at [outputPath]/App.framework from the assembly
/// source at [assemblyPath].
/// source at [assemblyPath].
Future
<
RunResult
>
_build
Ios
Framework
({
Future
<
RunResult
>
_buildFramework
({
@required
IOSArch
ios
Arch
,
@required
DarwinArch
apple
Arch
,
@required
String
assemblyPath
,
@required
String
assemblyPath
,
@required
String
outputPath
,
@required
String
outputPath
,
@required
bool
bitcode
,
@required
bool
bitcode
,
})
async
{
})
async
{
final
String
targetArch
=
iosArch
==
IOSArch
.
armv7
?
'armv7'
:
'arm64'
;
final
String
targetArch
=
getNameForDarwinArch
(
appleArch
)
;
printStatus
(
'Building App.framework for
$targetArch
...'
);
printStatus
(
'Building App.framework for
$targetArch
...'
);
final
List
<
String
>
commonBuildOptions
=
<
String
>[
'-arch'
,
targetArch
,
'-miphoneos-version-min=8.0'
];
final
List
<
String
>
commonBuildOptions
=
<
String
>[
'-arch'
,
targetArch
,
if
(
appleArch
==
DarwinArch
.
arm64
||
appleArch
==
DarwinArch
.
armv7
)
'-miphoneos-version-min=8.0'
,
];
final
String
assemblyO
=
fs
.
path
.
join
(
outputPath
,
'snapshot_assembly.o'
);
final
String
assemblyO
=
fs
.
path
.
join
(
outputPath
,
'snapshot_assembly.o'
);
final
RunResult
compileResult
=
await
xcode
.
cc
(<
String
>[
final
RunResult
compileResult
=
await
xcode
.
cc
(<
String
>[
...
@@ -322,6 +326,7 @@ class AOTSnapshotter {
...
@@ -322,6 +326,7 @@ class AOTSnapshotter {
TargetPlatform
.
android_arm
,
TargetPlatform
.
android_arm
,
TargetPlatform
.
android_arm64
,
TargetPlatform
.
android_arm64
,
TargetPlatform
.
ios
,
TargetPlatform
.
ios
,
TargetPlatform
.
darwin_x64
,
].
contains
(
platform
);
].
contains
(
platform
);
}
}
...
...
packages/flutter_tools/lib/src/build_info.dart
View file @
1df165ea
...
@@ -265,12 +265,13 @@ enum TargetPlatform {
...
@@ -265,12 +265,13 @@ enum TargetPlatform {
web_javascript
,
web_javascript
,
}
}
/// iOS target device architecture.
/// iOS
and macOS
target device architecture.
//
//
// TODO(cbracken): split TargetPlatform.ios into ios_armv7, ios_arm64.
// TODO(cbracken): split TargetPlatform.ios into ios_armv7, ios_arm64.
enum
IOS
Arch
{
enum
Darwin
Arch
{
armv7
,
armv7
,
arm64
,
arm64
,
x86_64
,
}
}
enum
AndroidArch
{
enum
AndroidArch
{
...
@@ -281,27 +282,29 @@ enum AndroidArch {
...
@@ -281,27 +282,29 @@ enum AndroidArch {
}
}
/// The default set of iOS device architectures to build for.
/// The default set of iOS device architectures to build for.
const
List
<
IOSArch
>
defaultIOSArchs
=
<
IOS
Arch
>[
const
List
<
DarwinArch
>
defaultIOSArchs
=
<
Darwin
Arch
>[
IOS
Arch
.
arm64
,
Darwin
Arch
.
arm64
,
];
];
String
getNameFor
IOSArch
(
IOS
Arch
arch
)
{
String
getNameFor
DarwinArch
(
Darwin
Arch
arch
)
{
switch
(
arch
)
{
switch
(
arch
)
{
case
IOS
Arch
.
armv7
:
case
Darwin
Arch
.
armv7
:
return
'armv7'
;
return
'armv7'
;
case
IOS
Arch
.
arm64
:
case
Darwin
Arch
.
arm64
:
return
'arm64'
;
return
'arm64'
;
case
DarwinArch
.
x86_64
:
return
'x86_64'
;
}
}
assert
(
false
);
assert
(
false
);
return
null
;
return
null
;
}
}
IOS
Arch
getIOSArchForName
(
String
arch
)
{
Darwin
Arch
getIOSArchForName
(
String
arch
)
{
switch
(
arch
)
{
switch
(
arch
)
{
case
'armv7'
:
case
'armv7'
:
return
IOS
Arch
.
armv7
;
return
Darwin
Arch
.
armv7
;
case
'arm64'
:
case
'arm64'
:
return
IOS
Arch
.
arm64
;
return
Darwin
Arch
.
arm64
;
}
}
assert
(
false
);
assert
(
false
);
return
null
;
return
null
;
...
...
packages/flutter_tools/lib/src/build_system/targets/ios.dart
View file @
1df165ea
...
@@ -32,8 +32,8 @@ abstract class AotAssemblyBase extends Target {
...
@@ -32,8 +32,8 @@ abstract class AotAssemblyBase extends Target {
final
bool
bitcode
=
environment
.
defines
[
kBitcodeFlag
]
==
'true'
;
final
bool
bitcode
=
environment
.
defines
[
kBitcodeFlag
]
==
'true'
;
final
BuildMode
buildMode
=
getBuildModeForName
(
environment
.
defines
[
kBuildMode
]);
final
BuildMode
buildMode
=
getBuildModeForName
(
environment
.
defines
[
kBuildMode
]);
final
TargetPlatform
targetPlatform
=
getTargetPlatformForName
(
environment
.
defines
[
kTargetPlatform
]);
final
TargetPlatform
targetPlatform
=
getTargetPlatformForName
(
environment
.
defines
[
kTargetPlatform
]);
final
List
<
IOS
Arch
>
iosArchs
=
environment
.
defines
[
kIosArchs
]?.
split
(
','
)?.
map
(
getIOSArchForName
)?.
toList
()
final
List
<
Darwin
Arch
>
iosArchs
=
environment
.
defines
[
kIosArchs
]?.
split
(
','
)?.
map
(
getIOSArchForName
)?.
toList
()
??
<
IOSArch
>[
IOS
Arch
.
arm64
];
??
<
DarwinArch
>[
Darwin
Arch
.
arm64
];
if
(
targetPlatform
!=
TargetPlatform
.
ios
)
{
if
(
targetPlatform
!=
TargetPlatform
.
ios
)
{
throw
Exception
(
'aot_assembly is only supported for iOS applications'
);
throw
Exception
(
'aot_assembly is only supported for iOS applications'
);
}
}
...
@@ -46,7 +46,7 @@ abstract class AotAssemblyBase extends Target {
...
@@ -46,7 +46,7 @@ abstract class AotAssemblyBase extends Target {
mainPath:
environment
.
buildDir
.
childFile
(
'app.dill'
).
path
,
mainPath:
environment
.
buildDir
.
childFile
(
'app.dill'
).
path
,
packagesPath:
environment
.
projectDir
.
childFile
(
'.packages'
).
path
,
packagesPath:
environment
.
projectDir
.
childFile
(
'.packages'
).
path
,
outputPath:
outputPath
,
outputPath:
outputPath
,
ios
Arch:
iosArchs
.
single
,
darwin
Arch:
iosArchs
.
single
,
bitcode:
bitcode
,
bitcode:
bitcode
,
);
);
if
(
snapshotExitCode
!=
0
)
{
if
(
snapshotExitCode
!=
0
)
{
...
@@ -56,14 +56,14 @@ abstract class AotAssemblyBase extends Target {
...
@@ -56,14 +56,14 @@ abstract class AotAssemblyBase extends Target {
// If we're building multiple iOS archs the binaries need to be lipo'd
// If we're building multiple iOS archs the binaries need to be lipo'd
// together.
// together.
final
List
<
Future
<
int
>>
pending
=
<
Future
<
int
>>[];
final
List
<
Future
<
int
>>
pending
=
<
Future
<
int
>>[];
for
(
IOS
Arch
iosArch
in
iosArchs
)
{
for
(
Darwin
Arch
iosArch
in
iosArchs
)
{
pending
.
add
(
snapshotter
.
build
(
pending
.
add
(
snapshotter
.
build
(
platform:
targetPlatform
,
platform:
targetPlatform
,
buildMode:
buildMode
,
buildMode:
buildMode
,
mainPath:
environment
.
buildDir
.
childFile
(
'app.dill'
).
path
,
mainPath:
environment
.
buildDir
.
childFile
(
'app.dill'
).
path
,
packagesPath:
environment
.
projectDir
.
childFile
(
'.packages'
).
path
,
packagesPath:
environment
.
projectDir
.
childFile
(
'.packages'
).
path
,
outputPath:
fs
.
path
.
join
(
outputPath
,
getNameFor
IOS
Arch
(
iosArch
)),
outputPath:
fs
.
path
.
join
(
outputPath
,
getNameFor
Darwin
Arch
(
iosArch
)),
ios
Arch:
iosArch
,
darwin
Arch:
iosArch
,
bitcode:
bitcode
,
bitcode:
bitcode
,
));
));
}
}
...
@@ -73,8 +73,8 @@ abstract class AotAssemblyBase extends Target {
...
@@ -73,8 +73,8 @@ abstract class AotAssemblyBase extends Target {
}
}
final
ProcessResult
result
=
await
processManager
.
run
(<
String
>[
final
ProcessResult
result
=
await
processManager
.
run
(<
String
>[
'lipo'
,
'lipo'
,
...
iosArchs
.
map
((
IOS
Arch
iosArch
)
=>
...
iosArchs
.
map
((
Darwin
Arch
iosArch
)
=>
fs
.
path
.
join
(
outputPath
,
getNameFor
IOS
Arch
(
iosArch
),
'App.framework'
,
'App'
)),
fs
.
path
.
join
(
outputPath
,
getNameFor
Darwin
Arch
(
iosArch
),
'App.framework'
,
'App'
)),
'-create'
,
'-create'
,
'-output'
,
'-output'
,
fs
.
path
.
join
(
outputPath
,
'App.framework'
,
'App'
),
fs
.
path
.
join
(
outputPath
,
'App.framework'
,
'App'
),
...
...
packages/flutter_tools/lib/src/commands/build_aot.dart
View file @
1df165ea
...
@@ -40,8 +40,8 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
...
@@ -40,8 +40,8 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
)
)
..
addMultiOption
(
'ios-arch'
,
..
addMultiOption
(
'ios-arch'
,
splitCommas:
true
,
splitCommas:
true
,
defaultsTo:
defaultIOSArchs
.
map
<
String
>(
getNameFor
IOS
Arch
),
defaultsTo:
defaultIOSArchs
.
map
<
String
>(
getNameFor
Darwin
Arch
),
allowed:
IOSArch
.
values
.
map
<
String
>(
getNameForIOS
Arch
),
allowed:
DarwinArch
.
values
.
map
<
String
>(
getNameForDarwin
Arch
),
help:
'iOS architectures to build.'
,
help:
'iOS architectures to build.'
,
)
)
..
addMultiOption
(
FlutterOptions
.
kExtraFrontEndOptions
,
..
addMultiOption
(
FlutterOptions
.
kExtraFrontEndOptions
,
...
@@ -118,17 +118,17 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
...
@@ -118,17 +118,17 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
// Build AOT snapshot.
// Build AOT snapshot.
if
(
platform
==
TargetPlatform
.
ios
)
{
if
(
platform
==
TargetPlatform
.
ios
)
{
// Determine which iOS architectures to build for.
// Determine which iOS architectures to build for.
final
Iterable
<
IOSArch
>
buildArchs
=
argResults
[
'ios-arch'
].
map
<
IOS
Arch
>(
getIOSArchForName
);
final
Iterable
<
DarwinArch
>
buildArchs
=
argResults
[
'ios-arch'
].
map
<
Darwin
Arch
>(
getIOSArchForName
);
final
Map
<
IOSArch
,
String
>
iosBuilds
=
<
IOS
Arch
,
String
>{};
final
Map
<
DarwinArch
,
String
>
iosBuilds
=
<
Darwin
Arch
,
String
>{};
for
(
IOS
Arch
arch
in
buildArchs
)
for
(
Darwin
Arch
arch
in
buildArchs
)
iosBuilds
[
arch
]
=
fs
.
path
.
join
(
outputPath
,
getNameFor
IOS
Arch
(
arch
));
iosBuilds
[
arch
]
=
fs
.
path
.
join
(
outputPath
,
getNameFor
Darwin
Arch
(
arch
));
// Generate AOT snapshot and compile to arch-specific App.framework.
// Generate AOT snapshot and compile to arch-specific App.framework.
final
Map
<
IOSArch
,
Future
<
int
>>
exitCodes
=
<
IOS
Arch
,
Future
<
int
>>{};
final
Map
<
DarwinArch
,
Future
<
int
>>
exitCodes
=
<
Darwin
Arch
,
Future
<
int
>>{};
iosBuilds
.
forEach
((
IOS
Arch
iosArch
,
String
outputPath
)
{
iosBuilds
.
forEach
((
Darwin
Arch
iosArch
,
String
outputPath
)
{
exitCodes
[
iosArch
]
=
snapshotter
.
build
(
exitCodes
[
iosArch
]
=
snapshotter
.
build
(
platform:
platform
,
platform:
platform
,
ios
Arch:
iosArch
,
darwin
Arch:
iosArch
,
buildMode:
buildMode
,
buildMode:
buildMode
,
mainPath:
mainPath
,
mainPath:
mainPath
,
packagesPath:
PackageMap
.
globalPackagesPath
,
packagesPath:
PackageMap
.
globalPackagesPath
,
...
@@ -160,7 +160,7 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
...
@@ -160,7 +160,7 @@ class BuildAotCommand extends BuildSubCommand with TargetPlatformBasedDevelopmen
]);
]);
}
else
{
}
else
{
status
?.
cancel
();
status
?.
cancel
();
exitCodes
.
forEach
((
IOS
Arch
iosArch
,
Future
<
int
>
exitCodeFuture
)
async
{
exitCodes
.
forEach
((
Darwin
Arch
iosArch
,
Future
<
int
>
exitCodeFuture
)
async
{
final
int
buildExitCode
=
await
exitCodeFuture
;
final
int
buildExitCode
=
await
exitCodeFuture
;
printError
(
'Snapshotting (
$iosArch
) exited with non-zero exit code:
$buildExitCode
'
);
printError
(
'Snapshotting (
$iosArch
) exited with non-zero exit code:
$buildExitCode
'
);
});
});
...
...
packages/flutter_tools/lib/src/ios/devices.dart
View file @
1df165ea
...
@@ -265,7 +265,7 @@ class IOSDevice extends Device {
...
@@ -265,7 +265,7 @@ class IOSDevice extends Device {
printTrace
(
'Building
${package.name}
for
$id
'
);
printTrace
(
'Building
${package.name}
for
$id
'
);
final
String
cpuArchitecture
=
await
iMobileDevice
.
getInfoForDevice
(
id
,
'CPUArchitecture'
);
final
String
cpuArchitecture
=
await
iMobileDevice
.
getInfoForDevice
(
id
,
'CPUArchitecture'
);
final
IOS
Arch
iosArch
=
getIOSArchForName
(
cpuArchitecture
);
final
Darwin
Arch
iosArch
=
getIOSArchForName
(
cpuArchitecture
);
// Step 1: Build the precompiled/DBC application if necessary.
// Step 1: Build the precompiled/DBC application if necessary.
final
XcodeBuildResult
buildResult
=
await
buildXcodeProject
(
final
XcodeBuildResult
buildResult
=
await
buildXcodeProject
(
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
1df165ea
...
@@ -201,7 +201,7 @@ Future<XcodeBuildResult> buildXcodeProject({
...
@@ -201,7 +201,7 @@ Future<XcodeBuildResult> buildXcodeProject({
BuildInfo
buildInfo
,
BuildInfo
buildInfo
,
String
targetOverride
,
String
targetOverride
,
bool
buildForDevice
,
bool
buildForDevice
,
IOS
Arch
activeArch
,
Darwin
Arch
activeArch
,
bool
codesign
=
true
,
bool
codesign
=
true
,
bool
usesTerminalUi
=
true
,
bool
usesTerminalUi
=
true
,
})
async
{
})
async
{
...
@@ -317,7 +317,7 @@ Future<XcodeBuildResult> buildXcodeProject({
...
@@ -317,7 +317,7 @@ Future<XcodeBuildResult> buildXcodeProject({
}
}
if
(
activeArch
!=
null
)
{
if
(
activeArch
!=
null
)
{
final
String
activeArchName
=
getNameFor
IOS
Arch
(
activeArch
);
final
String
activeArchName
=
getNameFor
Darwin
Arch
(
activeArch
);
if
(
activeArchName
!=
null
)
{
if
(
activeArchName
!=
null
)
{
buildCommands
.
add
(
'ONLY_ACTIVE_ARCH=YES'
);
buildCommands
.
add
(
'ONLY_ACTIVE_ARCH=YES'
);
buildCommands
.
add
(
'ARCHS=
$activeArchName
'
);
buildCommands
.
add
(
'ARCHS=
$activeArchName
'
);
...
...
packages/flutter_tools/test/general.shard/base/build_test.dart
View file @
1df165ea
...
@@ -50,7 +50,7 @@ class _FakeGenSnapshot implements GenSnapshot {
...
@@ -50,7 +50,7 @@ class _FakeGenSnapshot implements GenSnapshot {
Future
<
int
>
run
({
Future
<
int
>
run
({
SnapshotType
snapshotType
,
SnapshotType
snapshotType
,
String
depfilePath
,
String
depfilePath
,
IOSArch
ios
Arch
,
DarwinArch
darwin
Arch
,
Iterable
<
String
>
additionalArgs
=
const
<
String
>[],
Iterable
<
String
>
additionalArgs
=
const
<
String
>[],
})
async
{
})
async
{
_callCount
+=
1
;
_callCount
+=
1
;
...
@@ -191,7 +191,7 @@ void main() {
...
@@ -191,7 +191,7 @@ void main() {
mainPath:
'main.dill'
,
mainPath:
'main.dill'
,
packagesPath:
'.packages'
,
packagesPath:
'.packages'
,
outputPath:
outputPath
,
outputPath:
outputPath
,
iosArch:
IOS
Arch
.
armv7
,
darwinArch:
Darwin
Arch
.
armv7
,
bitcode:
true
,
bitcode:
true
,
);
);
...
@@ -245,7 +245,7 @@ void main() {
...
@@ -245,7 +245,7 @@ void main() {
mainPath:
'main.dill'
,
mainPath:
'main.dill'
,
packagesPath:
'.packages'
,
packagesPath:
'.packages'
,
outputPath:
outputPath
,
outputPath:
outputPath
,
iosArch:
IOS
Arch
.
armv7
,
darwinArch:
Darwin
Arch
.
armv7
,
bitcode:
false
,
bitcode:
false
,
);
);
...
@@ -292,7 +292,7 @@ void main() {
...
@@ -292,7 +292,7 @@ void main() {
mainPath:
'main.dill'
,
mainPath:
'main.dill'
,
packagesPath:
'.packages'
,
packagesPath:
'.packages'
,
outputPath:
outputPath
,
outputPath:
outputPath
,
iosArch:
IOS
Arch
.
arm64
,
darwinArch:
Darwin
Arch
.
arm64
,
bitcode:
false
,
bitcode:
false
,
);
);
...
@@ -328,7 +328,7 @@ void main() {
...
@@ -328,7 +328,7 @@ void main() {
mainPath:
'main.dill'
,
mainPath:
'main.dill'
,
packagesPath:
'.packages'
,
packagesPath:
'.packages'
,
outputPath:
outputPath
,
outputPath:
outputPath
,
iosArch:
IOS
Arch
.
armv7
,
darwinArch:
Darwin
Arch
.
armv7
,
bitcode:
false
,
bitcode:
false
,
);
);
...
@@ -366,7 +366,7 @@ void main() {
...
@@ -366,7 +366,7 @@ void main() {
mainPath:
'main.dill'
,
mainPath:
'main.dill'
,
packagesPath:
'.packages'
,
packagesPath:
'.packages'
,
outputPath:
outputPath
,
outputPath:
outputPath
,
iosArch:
IOS
Arch
.
arm64
,
darwinArch:
Darwin
Arch
.
arm64
,
bitcode:
false
,
bitcode:
false
,
);
);
...
...
packages/flutter_tools/test/general.shard/build_system/targets/dart_test.dart
View file @
1df165ea
...
@@ -323,10 +323,10 @@ class MockXcode extends Mock implements Xcode {}
...
@@ -323,10 +323,10 @@ class MockXcode extends Mock implements Xcode {}
class
FakeGenSnapshot
implements
GenSnapshot
{
class
FakeGenSnapshot
implements
GenSnapshot
{
List
<
String
>
lastCallAdditionalArgs
;
List
<
String
>
lastCallAdditionalArgs
;
@override
@override
Future
<
int
>
run
({
SnapshotType
snapshotType
,
IOSArch
ios
Arch
,
Iterable
<
String
>
additionalArgs
=
const
<
String
>[]})
async
{
Future
<
int
>
run
({
SnapshotType
snapshotType
,
DarwinArch
darwin
Arch
,
Iterable
<
String
>
additionalArgs
=
const
<
String
>[]})
async
{
lastCallAdditionalArgs
=
additionalArgs
.
toList
();
lastCallAdditionalArgs
=
additionalArgs
.
toList
();
final
Directory
out
=
fs
.
file
(
lastCallAdditionalArgs
.
last
).
parent
;
final
Directory
out
=
fs
.
file
(
lastCallAdditionalArgs
.
last
).
parent
;
if
(
ios
Arch
==
null
)
{
if
(
darwin
Arch
==
null
)
{
out
.
childFile
(
'app.so'
).
createSync
();
out
.
childFile
(
'app.so'
).
createSync
();
out
.
childFile
(
'gen_snapshot.d'
).
createSync
();
out
.
childFile
(
'gen_snapshot.d'
).
createSync
();
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment