mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:47:50 +00:00
[vm] Support -d0
on windows with clang
`python3 tools\build.py -ax64 -d0 --clang runtime` While MSVC expects `/O0`, clang-cl expects `-d0` instead. However, clang-cl still wants /O2. Change-Id: I7fa2f480cc9c110c7cd9c86072b5105106fbe76a Cq-Include-Trybots: luci.dart.try:dart-sdk-win-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236882 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
parent
d885296ca5
commit
a40f7d2a42
|
@ -777,10 +777,17 @@ config("no_optimize") {
|
|||
if (is_win) {
|
||||
# The only difference on windows is that the inlining is less aggressive.
|
||||
# (We accept the default level). Otherwise it is very slow.
|
||||
cflags = [
|
||||
"/O${debug_optimization_level}", # Do some optimizations.
|
||||
"/Oy-", # Disable omitting frame pointers, must be after /O2.
|
||||
]
|
||||
if (is_clang && debug_optimization_level != "2") {
|
||||
cflags = [
|
||||
"-d${debug_optimization_level}", # Do some optimizations.
|
||||
"/Oy-", # Disable omitting frame pointers, must be after /O2.
|
||||
]
|
||||
} else {
|
||||
cflags = [
|
||||
"/O${debug_optimization_level}", # Do some optimizations.
|
||||
"/Oy-", # Disable omitting frame pointers, must be after /O2.
|
||||
]
|
||||
}
|
||||
} else if (is_android) {
|
||||
# On Android we kind of optimize some things that don't affect debugging
|
||||
# much even when optimization is disabled to get the binary size down.
|
||||
|
|
|
@ -168,10 +168,17 @@ config("dart_config") {
|
|||
# flags.
|
||||
if (is_win) {
|
||||
if (dart_debug) {
|
||||
cflags = [
|
||||
"/O${dart_debug_optimization_level}",
|
||||
"/Oy-",
|
||||
]
|
||||
if (is_clang && dart_debug_optimization_level != "2") {
|
||||
cflags = [
|
||||
"-d${dart_debug_optimization_level}",
|
||||
"/Oy-",
|
||||
]
|
||||
} else {
|
||||
cflags = [
|
||||
"/O${dart_debug_optimization_level}",
|
||||
"/Oy-",
|
||||
]
|
||||
}
|
||||
} else {
|
||||
cflags = [
|
||||
"/O2",
|
||||
|
|
Loading…
Reference in a new issue