sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Windows + Clang: `unknown argument ignored in clang-cl: '-fno-omit-frame-pointer' [-Wunknown-argument]`

Open eseidel opened this issue 1 year ago • 7 comments
trafficstars

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?

eseidel avatar Aug 06 '24 22:08 eseidel

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.

eseidel avatar Aug 06 '24 22:08 eseidel

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.

dart-github-bot avatar Aug 06 '24 22:08 dart-github-bot

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?

athomas avatar Aug 22 '24 08:08 athomas

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.

rmacnak-google avatar Aug 26 '24 18:08 rmacnak-google

@zanderso FYI, seems clang is behind in Flutter Engine causing warnings.

https://autoroll.skia.org/r/clang-flutter-engine seems blocked on formatting issues.

athomas avatar Aug 27 '24 07:08 athomas

I think there was another blocker beyond just formatting. @jason-simmons might remember what it was.

zanderso avatar Aug 27 '24 14:08 zanderso

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.

jason-simmons avatar Aug 27 '24 14:08 jason-simmons