[PATCH] D102568: [Driver] Delete -mimplicit-it=

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 19 04:26:45 PDT 2021


mstorsjo added a comment.

I would request that this commit should be reverted.

> This is a GNU as

This is true

> and Clang cc1as option, not a GCC option. Users should specify -Wa,-mimplicit-it= instead.

This is not true if you look at any existing stable release - Clang 12.0 doesn't support `-Wa,-mimplicit-it=`. That was only added in D96285 <https://reviews.llvm.org/D96285> on February 11th.

I would request that you leave both forms of the option to coexist for at least a couple stable releases, so that users have a reasonable way of migrating forward, without immediately dropping support for all older versions of the compiler.

In D102568#2764081 <https://reviews.llvm.org/D102568#2764081>, @nickdesaulniers wrote:

> Seems fine to me; the only reference in all of Android that looks problematic might be building libaom for windows: https://android.googlesource.com/platform/external/libaom/+/refs/heads/master/libaom/build/cmake/aom_configure.cmake#158, which I don't think we do for Android.

It turns out that libaom actually doesn't have any standalone gas-style assembly, so that option there won't ever have any effect (otherwise it would have broken my build).

But this change did break my build in these places:
https://code.videolan.org/videolan/x264/-/blob/b684ebe04a6f80f8207a57940a1fa00e25274f81/configure#L855
https://chromium.googlesource.com/webm/libvpx/+/66c1ff6850fd53bcf5c17247569bea1d700d6247/build/make/configure.sh#1012
https://github.com/cisco/openh264/blob/089d6c6d83ab6e5d451ef18808bb6c46faf553a2/build/platform-mingw_nt.mk#L23

> Should be an easy fix either way (replace `-mimplicit-it=always` with `-Wa,-wmimplicit-it=always`).

No, it's not an easy fix as no existing releases of Clang support it.

> The linux kernel already uses `-Wa,-mimplicit-it`. Also, GCC rejects the option:

Indeed.

The reason why it's common in these cases, and why the difference to GCC's behaviour in these cases hasn't been noticed, is that this flag is often needed for windows/arm, and GCC doesn't support windows/arm at all, so all those codepaths have only been used with Clang.

(The reason why this option often is used for that target, is that windows on arm only supports thumb - while many codecs with handwritten assembly is written to be built in arm mode only; handwritten assembly that hasn't taken thumb mode into account may need `-mimplicit-it=always` to work in thumb mode.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102568/new/

https://reviews.llvm.org/D102568



More information about the cfe-commits mailing list