-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland "Build iOS unittest target in unopt builds" (#44356)" #44821
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -263,8 +263,10 @@ source_set("ios_test_flutter_mrc") { | |
| } | ||
|
|
||
| shared_library("ios_test_flutter") { | ||
| testonly = true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we getting rid of this? It seems like a useful guard against non-test targets including test TUs.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When this flag is on, because
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should not make flutter_framework depend on ios_test_flutter, we should update some higher level
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e.g. in if (enable_unittests && is_ios) {
public_deps += [ "//flutter/shell/platform/darwin/ios:ios_test_flutter" ]
}
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. Or I can make group(darwin) testonly? If that's a problem I can move the dependency to a upper level. Eventually I should be able to find a unbrella build target that is testonly up in the chain. |
||
| visibility = [ ":*" ] | ||
| visibility = [ | ||
| ":*", | ||
| "//flutter/shell/platform/darwin:*", | ||
| ] | ||
| cflags = [ | ||
| "-fvisibility=default", | ||
| "-F$platform_frameworks_path", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just
if (enable_unittests)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable_unittests = current_toolchain == host_toolchain || is_fuchsia || is_mac, I will add|| is_ios