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
73ea37ec
Unverified
Commit
73ea37ec
authored
Mar 14, 2020
by
Jenn Magder
Committed by
GitHub
Mar 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fall back to environment SDKROOT passed from Xcode (#52570)" (#52583)
This reverts commit
8e6e15f9
.
parent
8bff33e4
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
39 deletions
+6
-39
build.dart
packages/flutter_tools/lib/src/base/build.dart
+1
-1
ios.dart
packages/flutter_tools/lib/src/build_system/targets/ios.dart
+1
-1
xcode.dart
packages/flutter_tools/lib/src/macos/xcode.dart
+3
-6
build_test.dart
...ges/flutter_tools/test/general.shard/base/build_test.dart
+1
-1
xcode_test.dart
...es/flutter_tools/test/general.shard/macos/xcode_test.dart
+0
-30
No files found.
packages/flutter_tools/lib/src/base/build.dart
View file @
73ea37ec
...
@@ -225,7 +225,7 @@ class AOTSnapshotter {
...
@@ -225,7 +225,7 @@ class AOTSnapshotter {
final
String
assemblyO
=
globals
.
fs
.
path
.
join
(
outputPath
,
'snapshot_assembly.o'
);
final
String
assemblyO
=
globals
.
fs
.
path
.
join
(
outputPath
,
'snapshot_assembly.o'
);
List
<
String
>
isysrootArgs
;
List
<
String
>
isysrootArgs
;
if
(
isIOS
)
{
if
(
isIOS
)
{
final
String
iPhoneSDKLocation
=
await
globals
.
xcode
.
sdkLocation
(
SdkType
.
iPhone
,
globals
.
platform
.
environment
);
final
String
iPhoneSDKLocation
=
await
globals
.
xcode
.
sdkLocation
(
SdkType
.
iPhone
);
if
(
iPhoneSDKLocation
!=
null
)
{
if
(
iPhoneSDKLocation
!=
null
)
{
isysrootArgs
=
<
String
>[
'-isysroot'
,
iPhoneSDKLocation
];
isysrootArgs
=
<
String
>[
'-isysroot'
,
iPhoneSDKLocation
];
}
}
...
...
packages/flutter_tools/lib/src/build_system/targets/ios.dart
View file @
73ea37ec
...
@@ -412,7 +412,7 @@ Future<RunResult> createStubAppFramework(File outputFile, SdkType sdk, { bool in
...
@@ -412,7 +412,7 @@ Future<RunResult> createStubAppFramework(File outputFile, SdkType sdk, { bool in
'-Xlinker'
,
'-rpath'
,
'-Xlinker'
,
'@executable_path/Frameworks'
,
'-Xlinker'
,
'-rpath'
,
'-Xlinker'
,
'@executable_path/Frameworks'
,
'-Xlinker'
,
'-rpath'
,
'-Xlinker'
,
'@loader_path/Frameworks'
,
'-Xlinker'
,
'-rpath'
,
'-Xlinker'
,
'@loader_path/Frameworks'
,
'-install_name'
,
'@rpath/App.framework/App'
,
'-install_name'
,
'@rpath/App.framework/App'
,
'-isysroot'
,
await
globals
.
xcode
.
sdkLocation
(
sdk
,
globals
.
platform
.
environment
),
'-isysroot'
,
await
globals
.
xcode
.
sdkLocation
(
sdk
),
'-o'
,
outputFile
.
path
,
'-o'
,
outputFile
.
path
,
]);
]);
}
finally
{
}
finally
{
...
...
packages/flutter_tools/lib/src/macos/xcode.dart
View file @
73ea37ec
...
@@ -165,17 +165,14 @@ class Xcode {
...
@@ -165,17 +165,14 @@ class Xcode {
);
);
}
}
Future
<
String
>
sdkLocation
(
SdkType
sdk
,
Map
<
String
,
String
>
environment
)
async
{
Future
<
String
>
sdkLocation
(
SdkType
sdk
)
async
{
// If this is run an Xcode script build phase, the SDKROOT is already exported.
if
(
environment
.
containsKey
(
'SDKROOT'
))
{
return
environment
[
'SDKROOT'
];
}
assert
(
sdk
!=
null
);
assert
(
sdk
!=
null
);
final
RunResult
runResult
=
await
_processUtils
.
run
(
final
RunResult
runResult
=
await
_processUtils
.
run
(
<
String
>[
'xcrun'
,
'--sdk'
,
getNameForSdk
(
sdk
),
'--show-sdk-path'
],
<
String
>[
'xcrun'
,
'--sdk'
,
getNameForSdk
(
sdk
),
'--show-sdk-path'
],
throwOnError:
true
,
);
);
if
(
runResult
.
exitCode
!=
0
)
{
if
(
runResult
.
exitCode
!=
0
)
{
throwToolExit
(
'Could not find SDK location:
${runResult.stderr}
'
);
throwToolExit
(
'Could not find
iPhone
SDK location:
${runResult.stderr}
'
);
}
}
return
runResult
.
stdout
.
trim
();
return
runResult
.
stdout
.
trim
();
}
}
...
...
packages/flutter_tools/test/general.shard/base/build_test.dart
View file @
73ea37ec
...
@@ -240,7 +240,7 @@ void main() {
...
@@ -240,7 +240,7 @@ void main() {
mockAndroidSdk
=
MockAndroidSdk
();
mockAndroidSdk
=
MockAndroidSdk
();
mockArtifacts
=
MockArtifacts
();
mockArtifacts
=
MockArtifacts
();
mockXcode
=
MockXcode
();
mockXcode
=
MockXcode
();
when
(
mockXcode
.
sdkLocation
(
any
,
any
)).
thenAnswer
((
_
)
=>
Future
<
String
>.
value
(
kSDKPath
));
when
(
mockXcode
.
sdkLocation
(
any
)).
thenAnswer
((
_
)
=>
Future
<
String
>.
value
(
kSDKPath
));
for
(
final
BuildMode
mode
in
BuildMode
.
values
)
{
for
(
final
BuildMode
mode
in
BuildMode
.
values
)
{
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
snapshotDart
,
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
snapshotDart
,
...
...
packages/flutter_tools/test/general.shard/macos/xcode_test.dart
View file @
73ea37ec
...
@@ -178,36 +178,6 @@ void main() {
...
@@ -178,36 +178,6 @@ void main() {
expect
(
getNameForSdk
(
SdkType
.
iPhoneSimulator
),
'iphonesimulator'
);
expect
(
getNameForSdk
(
SdkType
.
iPhoneSimulator
),
'iphonesimulator'
);
expect
(
getNameForSdk
(
SdkType
.
macOS
),
'macosx'
);
expect
(
getNameForSdk
(
SdkType
.
macOS
),
'macosx'
);
});
});
group
(
'SDK location'
,
()
{
const
String
sdkroot
=
'Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk'
;
testWithoutContext
(
'environment'
,
()
async
{
expect
(
await
xcode
.
sdkLocation
(
SdkType
.
iPhone
,
<
String
,
String
>{
'SDKROOT'
:
sdkroot
}),
sdkroot
);
});
testWithoutContext
(
'--show-sdk-path iphoneos'
,
()
async
{
when
(
processManager
.
run
(<
String
>[
'xcrun'
,
'--sdk'
,
'iphoneos'
,
'--show-sdk-path'
])).
thenAnswer
((
_
)
=>
Future
<
ProcessResult
>.
value
(
ProcessResult
(
1
,
0
,
sdkroot
,
''
)));
expect
(
await
xcode
.
sdkLocation
(
SdkType
.
iPhone
,
<
String
,
String
>{}),
sdkroot
);
});
testWithoutContext
(
'--show-sdk-path macosx'
,
()
async
{
when
(
processManager
.
run
(<
String
>[
'xcrun'
,
'--sdk'
,
'macosx'
,
'--show-sdk-path'
])).
thenAnswer
((
_
)
=>
Future
<
ProcessResult
>.
value
(
ProcessResult
(
1
,
0
,
sdkroot
,
''
)));
expect
(
await
xcode
.
sdkLocation
(
SdkType
.
macOS
,
<
String
,
String
>{}),
sdkroot
);
});
testWithoutContext
(
'--show-sdk-path fails'
,
()
async
{
when
(
processManager
.
run
(<
String
>[
'xcrun'
,
'--sdk'
,
'iphoneos'
,
'--show-sdk-path'
])).
thenAnswer
((
_
)
=>
Future
<
ProcessResult
>.
value
(
ProcessResult
(
1
,
1
,
''
,
'xcrun: error:'
)));
expect
(()
async
=>
await
xcode
.
sdkLocation
(
SdkType
.
iPhone
,
<
String
,
String
>{}),
throwsToolExit
(
message:
'Could not find SDK location'
));
});
});
});
});
group
(
'xcdevice'
,
()
{
group
(
'xcdevice'
,
()
{
...
...
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