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
c823acc3
Commit
c823acc3
authored
Jun 21, 2016
by
Jason Simmons
Committed by
GitHub
Jun 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass a package map to gen_snapshot instead of a packages symlink directory (#4666)
parent
d4ecd023
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
build_aot.dart
packages/flutter_tools/lib/src/commands/build_aot.dart
+10
-18
No files found.
packages/flutter_tools/lib/src/commands/build_aot.dart
View file @
c823acc3
...
...
@@ -11,7 +11,7 @@ import '../base/logger.dart';
import
'../base/process.dart'
;
import
'../base/utils.dart'
;
import
'../build_info.dart'
;
import
'../dart/
sdk
.dart'
;
import
'../dart/
package_map
.dart'
;
import
'../globals.dart'
;
import
'../run.dart'
;
import
'../runner/flutter_command.dart'
;
...
...
@@ -71,9 +71,8 @@ class BuildAotCommand extends FlutterCommand {
}
}
String
_getSdkExtensionPath
(
String
packagesPath
,
String
package
)
{
Directory
packageDir
=
new
Directory
(
path
.
join
(
packagesPath
,
package
));
return
path
.
dirname
(
packageDir
.
resolveSymbolicLinksSync
());
String
_getSdkExtensionPath
(
PackageMap
packageMap
,
String
package
)
{
return
path
.
dirname
(
packageMap
.
map
[
package
].
toFilePath
());
}
/// Build an AOT snapshot. Return `null` (and log to `printError`) if the method
...
...
@@ -152,24 +151,17 @@ Future<String> _buildAotSnapshot(
String
vmEntryPoints
=
path
.
join
(
entryPointsDir
,
'dart_vm_entry_points.txt'
);
String
ioEntryPoints
=
path
.
join
(
dartEntryPointsDir
,
'dart_io_entries.txt'
);
String
packagesPath
=
path
.
absolute
(
Directory
.
current
.
path
,
'packages'
);
if
(!
FileSystemEntity
.
isDirectorySync
(
packagesPath
))
{
printStatus
(
'Missing packages directory; running `pub get` (to work around https://github.com/dart-lang/sdk/issues/26362).'
);
// We don't use [pubGet] because we explicitly want to avoid --no-package-symlinks.
runCheckedSync
(<
String
>[
sdkBinaryName
(
'pub'
),
'get'
,
'--no-precompile'
]);
}
if
(!
FileSystemEntity
.
isDirectorySync
(
packagesPath
))
{
printError
(
'Could not find packages directory:
$packagesPath
\n
'
+
'Did you run `pub get` in this directory?'
);
printError
(
'This is needed to work around '
+
'https://github.com/dart-lang/sdk/issues/26362'
);
PackageMap
packageMap
=
new
PackageMap
(
PackageMap
.
globalPackagesPath
);
String
packageMapError
=
packageMap
.
checkValid
();
if
(
packageMapError
!=
null
)
{
printError
(
packageMapError
);
return
null
;
}
String
mojoPkg
=
_getSdkExtensionPath
(
package
sPath
,
'mojo'
);
String
mojoPkg
=
_getSdkExtensionPath
(
package
Map
,
'mojo'
);
String
mojoInternalPath
=
path
.
join
(
mojoPkg
,
'sdk_ext'
,
'internal.dart'
);
String
skyEnginePkg
=
_getSdkExtensionPath
(
package
sPath
,
'sky_engine'
);
String
skyEnginePkg
=
_getSdkExtensionPath
(
package
Map
,
'sky_engine'
);
String
uiPath
=
path
.
join
(
skyEnginePkg
,
'dart_ui'
,
'ui.dart'
);
String
jniPath
=
path
.
join
(
skyEnginePkg
,
'dart_jni'
,
'jni.dart'
);
String
vmServicePath
=
path
.
join
(
skyEnginePkg
,
'sdk_ext'
,
'dart'
,
'runtime'
,
'bin'
,
'vmservice'
,
'vmservice_io.dart'
);
...
...
@@ -222,7 +214,7 @@ Future<String> _buildAotSnapshot(
genSnapshot
,
'--vm_isolate_snapshot=
$vmIsolateSnapshot
'
,
'--isolate_snapshot=
$isolateSnapshot
'
,
'--package
_root=
$packagesPath
'
,
'--package
s=
${packageMap.packagesPath}
'
,
'--url_mapping=dart:mojo.internal,
$mojoInternalPath
'
,
'--url_mapping=dart:ui,
$uiPath
'
,
'--url_mapping=dart:jni,
$jniPath
'
,
...
...
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