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
11621cc7
Unverified
Commit
11621cc7
authored
Jan 28, 2020
by
Jonah Williams
Committed by
GitHub
Jan 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] remove dwarf stripping now that linked issue is fixed (#49563)
parent
ace2c229
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
23 deletions
+9
-23
build.dart
packages/flutter_tools/lib/src/base/build.dart
+2
-18
build_test.dart
...ges/flutter_tools/test/general.shard/base/build_test.dart
+7
-5
No files found.
packages/flutter_tools/lib/src/base/build.dart
View file @
11621cc7
...
@@ -137,6 +137,7 @@ class AOTSnapshotter {
...
@@ -137,6 +137,7 @@ class AOTSnapshotter {
outputPaths
.
add
(
assembly
);
outputPaths
.
add
(
assembly
);
genSnapshotArgs
.
add
(
'--snapshot_kind=app-aot-assembly'
);
genSnapshotArgs
.
add
(
'--snapshot_kind=app-aot-assembly'
);
genSnapshotArgs
.
add
(
'--assembly=
$assembly
'
);
genSnapshotArgs
.
add
(
'--assembly=
$assembly
'
);
genSnapshotArgs
.
add
(
'--strip'
);
}
else
{
}
else
{
final
String
aotSharedLibrary
=
globals
.
fs
.
path
.
join
(
outputDir
.
path
,
'app.so'
);
final
String
aotSharedLibrary
=
globals
.
fs
.
path
.
join
(
outputDir
.
path
,
'app.so'
);
outputPaths
.
add
(
aotSharedLibrary
);
outputPaths
.
add
(
aotSharedLibrary
);
...
@@ -184,23 +185,6 @@ class AOTSnapshotter {
...
@@ -184,23 +185,6 @@ class AOTSnapshotter {
return
genSnapshotExitCode
;
return
genSnapshotExitCode
;
}
}
// TODO(dnfield): This should be removed when https://github.com/dart-lang/sdk/issues/37560
// is resolved.
// The DWARF section confuses Xcode tooling, so this strips it. Ideally,
// gen_snapshot would provide an argument to do this automatically.
final
bool
stripSymbols
=
platform
==
TargetPlatform
.
ios
&&
buildMode
==
BuildMode
.
release
&&
bitcode
;
if
(
stripSymbols
)
{
final
IOSink
sink
=
globals
.
fs
.
file
(
'
$assembly
.stripped.S'
).
openWrite
();
for
(
final
String
line
in
globals
.
fs
.
file
(
assembly
).
readAsLinesSync
())
{
if
(
line
.
startsWith
(
'.section __DWARF'
))
{
break
;
}
sink
.
writeln
(
line
);
}
await
sink
.
flush
();
await
sink
.
close
();
}
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll
// Write path to gen_snapshot, since snapshots have to be re-generated when we roll
// the Dart SDK.
// the Dart SDK.
// TODO(jonahwilliams): remove when all callers are using assemble.
// TODO(jonahwilliams): remove when all callers are using assemble.
...
@@ -213,7 +197,7 @@ class AOTSnapshotter {
...
@@ -213,7 +197,7 @@ class AOTSnapshotter {
final
RunResult
result
=
await
_buildFramework
(
final
RunResult
result
=
await
_buildFramework
(
appleArch:
darwinArch
,
appleArch:
darwinArch
,
isIOS:
platform
==
TargetPlatform
.
ios
,
isIOS:
platform
==
TargetPlatform
.
ios
,
assemblyPath:
stripSymbols
?
'
$assembly
.stripped.S'
:
assembly
,
assemblyPath:
assembly
,
outputPath:
outputDir
.
path
,
outputPath:
outputDir
.
path
,
bitcode:
bitcode
,
bitcode:
bitcode
,
quiet:
quiet
,
quiet:
quiet
,
...
...
packages/flutter_tools/test/general.shard/base/build_test.dart
View file @
11621cc7
...
@@ -326,6 +326,7 @@ void main() {
...
@@ -326,6 +326,7 @@ void main() {
'--deterministic'
,
'--deterministic'
,
'--snapshot_kind=app-aot-assembly'
,
'--snapshot_kind=app-aot-assembly'
,
'--assembly=
$assembly
'
,
'--assembly=
$assembly
'
,
'--strip'
,
'--no-sim-use-hardfp'
,
'--no-sim-use-hardfp'
,
'--no-use-integer-division'
,
'--no-use-integer-division'
,
'--no-causal-async-stacks'
,
'--no-causal-async-stacks'
,
...
@@ -360,7 +361,7 @@ void main() {
...
@@ -360,7 +361,7 @@ void main() {
final
String
assembly
=
globals
.
fs
.
path
.
join
(
outputPath
,
'snapshot_assembly.S'
);
final
String
assembly
=
globals
.
fs
.
path
.
join
(
outputPath
,
'snapshot_assembly.S'
);
genSnapshot
.
outputs
=
<
String
,
String
>{
genSnapshot
.
outputs
=
<
String
,
String
>{
assembly:
'blah blah
\n
.section __DWARF
\n
blah blah
\n
'
,
assembly:
'blah blah
\n
'
,
};
};
final
RunResult
successResult
=
RunResult
(
ProcessResult
(
1
,
0
,
''
,
''
),
<
String
>[
'command name'
,
'arguments...'
]);
final
RunResult
successResult
=
RunResult
(
ProcessResult
(
1
,
0
,
''
,
''
),
<
String
>[
'command name'
,
'arguments...'
]);
...
@@ -385,6 +386,7 @@ void main() {
...
@@ -385,6 +386,7 @@ void main() {
'--deterministic'
,
'--deterministic'
,
'--snapshot_kind=app-aot-assembly'
,
'--snapshot_kind=app-aot-assembly'
,
'--assembly=
$assembly
'
,
'--assembly=
$assembly
'
,
'--strip'
,
'--no-sim-use-hardfp'
,
'--no-sim-use-hardfp'
,
'--no-use-integer-division'
,
'--no-use-integer-division'
,
'--no-causal-async-stacks'
,
'--no-causal-async-stacks'
,
...
@@ -407,11 +409,7 @@ void main() {
...
@@ -407,11 +409,7 @@ void main() {
expect
(
clangArgs
,
contains
(
kSDKPath
));
expect
(
clangArgs
,
contains
(
kSDKPath
));
final
File
assemblyFile
=
globals
.
fs
.
file
(
assembly
);
final
File
assemblyFile
=
globals
.
fs
.
file
(
assembly
);
final
File
assemblyBitcodeFile
=
globals
.
fs
.
file
(
'
$assembly
.stripped.S'
);
expect
(
assemblyFile
.
existsSync
(),
true
);
expect
(
assemblyFile
.
existsSync
(),
true
);
expect
(
assemblyBitcodeFile
.
existsSync
(),
true
);
expect
(
assemblyFile
.
readAsStringSync
().
contains
(
'.section __DWARF'
),
true
);
expect
(
assemblyBitcodeFile
.
readAsStringSync
().
contains
(
'.section __DWARF'
),
false
);
},
overrides:
contextOverrides
);
},
overrides:
contextOverrides
);
testUsingContext
(
'builds iOS armv7 profile AOT snapshot'
,
()
async
{
testUsingContext
(
'builds iOS armv7 profile AOT snapshot'
,
()
async
{
...
@@ -447,6 +445,7 @@ void main() {
...
@@ -447,6 +445,7 @@ void main() {
'--deterministic'
,
'--deterministic'
,
'--snapshot_kind=app-aot-assembly'
,
'--snapshot_kind=app-aot-assembly'
,
'--assembly=
$assembly
'
,
'--assembly=
$assembly
'
,
'--strip'
,
'--no-sim-use-hardfp'
,
'--no-sim-use-hardfp'
,
'--no-use-integer-division'
,
'--no-use-integer-division'
,
'--no-causal-async-stacks'
,
'--no-causal-async-stacks'
,
...
@@ -496,6 +495,7 @@ void main() {
...
@@ -496,6 +495,7 @@ void main() {
'--deterministic'
,
'--deterministic'
,
'--snapshot_kind=app-aot-assembly'
,
'--snapshot_kind=app-aot-assembly'
,
'--assembly=
${globals.fs.path.join(outputPath, 'snapshot_assembly.S')}
'
,
'--assembly=
${globals.fs.path.join(outputPath, 'snapshot_assembly.S')}
'
,
'--strip'
,
'--no-causal-async-stacks'
,
'--no-causal-async-stacks'
,
'--lazy-async-stacks'
,
'--lazy-async-stacks'
,
'main.dill'
,
'main.dill'
,
...
@@ -534,6 +534,7 @@ void main() {
...
@@ -534,6 +534,7 @@ void main() {
'--deterministic'
,
'--deterministic'
,
'--snapshot_kind=app-aot-assembly'
,
'--snapshot_kind=app-aot-assembly'
,
'--assembly=
${globals.fs.path.join(outputPath, 'snapshot_assembly.S')}
'
,
'--assembly=
${globals.fs.path.join(outputPath, 'snapshot_assembly.S')}
'
,
'--strip'
,
'--no-sim-use-hardfp'
,
'--no-sim-use-hardfp'
,
'--no-use-integer-division'
,
'--no-use-integer-division'
,
'--no-causal-async-stacks'
,
'--no-causal-async-stacks'
,
...
@@ -574,6 +575,7 @@ void main() {
...
@@ -574,6 +575,7 @@ void main() {
'--deterministic'
,
'--deterministic'
,
'--snapshot_kind=app-aot-assembly'
,
'--snapshot_kind=app-aot-assembly'
,
'--assembly=
${globals.fs.path.join(outputPath, 'snapshot_assembly.S')}
'
,
'--assembly=
${globals.fs.path.join(outputPath, 'snapshot_assembly.S')}
'
,
'--strip'
,
'--no-causal-async-stacks'
,
'--no-causal-async-stacks'
,
'--lazy-async-stacks'
,
'--lazy-async-stacks'
,
'main.dill'
,
'main.dill'
,
...
...
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