sdk
sdk copied to clipboard
Windows + Clang: `unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]`
I'm seeing this spam on windows when building with 3.5.0
clang-cl: warning: unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]
[1096/3154] CXX obj/flutter/third_party/dart/runtime/vm/compiler/libdart_compiler_precompiler.stub_code_compiler_arm.obj
clang-cl: warning: unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]
[1097/3154] CXX obj/flutter/third_party/dart/runtime/vm/compiler/libdart_compiler_precompiler.stub_code_compiler_arm64.obj
clang-cl: warning: unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]
[1098/3154] CXX obj/flutter/third_party/dart/runtime/vm/compiler/libdart_compiler_precompiler.stub_code_compiler_riscv.obj
clang-cl: warning: unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]
[1099/3154] CXX obj/flutter/third_party/dart/runtime/vm/compiler/libdart_compiler_precompiler.stub_code_compiler_ia32.obj
clang-cl: warning: unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]
[1100/3154] CXX obj/flutter/third_party/dart/runtime/vm/compiler/libdart_compiler_precompiler.write_barrier_elimination.obj
clang-cl: warning: unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]
It's possible this has been fixed on main (I've not yet tried main on our windows bots), but I think it's coming from this line: https://github.com/dart-lang/sdk/blob/146126ff848dc2dfe0b5618902ff3c6dcd89fcd8/runtime/BUILD.gn#L85 Which I think might just be wrong on windows?
I'm not sure where the dart windows bots are, but it should be pretty obvious in their output if it's still a problem there.
Summary: The -fno-omit-frame-pointer flag is being passed to clang-cl on Windows, which is not supported and causes warnings. This flag is likely being passed incorrectly from the Dart SDK's build system.
This is actually a flutter build issue. The output doesn't appear on standalone Dart builds. The difference is in the clang version. Dart has clang pinned at 1 and flutter engine uses 2. There's a 5 months difference between those versions.
@rmacnak-google do you know why we're using different clang versions?
Dart and Flutter's rollers are both trying to update to the CIPD package with the tag "integration". Likely Flutter just has some issue and no one has looked into the failing roller.
@zanderso FYI, seems clang is behind in Flutter Engine causing warnings.
https://autoroll.skia.org/r/clang-flutter-engine seems blocked on formatting issues.
I think there was another blocker beyond just formatting. @jason-simmons might remember what it was.
We have not rolled Clang in several months due to a series of issues.
The last roll attempt ran into a crash that appeared to occur within Dart on some devices (see https://github.com/flutter/flutter/issues/143178#issuecomment-2118118315).
I haven't heard any updates about that but can try another Clang roll attempt soon.