Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53f59456 authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar
Browse files

Do not enable -Wold-style-cast for Windows

Bug: http://b/91353691

Enable -Wold-style-cast only for non-Windows targets.  _islower_l,
_isupper_l etc. in MinGW locale_win32.h (included from
libcxx/include/__locale) have an old-style-cast.

Test: Build and test Windows modules under Wine.
Change-Id: Ib7594559a43096885b0cc1c656cf59db8b52d38b
parent 18a1606a
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -23,11 +23,21 @@ cc_defaults {
        "-D_FILE_OFFSET_BITS=64",
    ],
    cppflags: [
        "-Wold-style-cast",
        // Incorrectly warns when C++11 empty brace {} initializer is used.
        // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489
        "-Wno-missing-field-initializers",
    ],

    // Enable -Wold-style-cast only for non-Windows targets.  _islower_l,
    // _isupper_l etc. in MinGW locale_win32.h (included from
    // libcxx/include/__locale) has an old-style-cast.
    target: {
        not_windows: {
            cppflags: [
                "-Wold-style-cast",
            ],
        },
    },
}

cc_defaults {