summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorTreehugger Robot2018-06-26 14:47:53 -0500
committerGerrit Code Review2018-06-26 14:47:53 -0500
commitb8f4fe4fd46fb9c5e1f53d4f3fcc87c7bd63ee7d (patch)
treebb59937427270405de6c99de7aa15707846d9b43 /adb
parentb0ea3d38b4e61b6d9705004e6f255164c7617213 (diff)
parenta2df1ef4413144fe7d09a22f4750df05e83c13fb (diff)
downloadplatform-system-core-b8f4fe4fd46fb9c5e1f53d4f3fcc87c7bd63ee7d.tar.gz
platform-system-core-b8f4fe4fd46fb9c5e1f53d4f3fcc87c7bd63ee7d.tar.xz
platform-system-core-b8f4fe4fd46fb9c5e1f53d4f3fcc87c7bd63ee7d.zip
Merge changes from topic "mingw-clang"
* changes: Do not customize __format__ for Windows/MinGW to gnu_printf Adapt to switch to Clang for Windows host builds Update cflags for building Windows modules with Clang
Diffstat (limited to 'adb')
-rw-r--r--adb/Android.bp12
-rw-r--r--adb/sysdeps.h10
2 files changed, 8 insertions, 14 deletions
diff --git a/adb/Android.bp b/adb/Android.bp
index 97c976203..c0e4c5758 100644
--- a/adb/Android.bp
+++ b/adb/Android.bp
@@ -19,17 +19,13 @@ cc_defaults {
19 "-Wall", 19 "-Wall",
20 "-Wextra", 20 "-Wextra",
21 "-Werror", 21 "-Werror",
22 "-Wexit-time-destructors",
22 "-Wno-unused-parameter", 23 "-Wno-unused-parameter",
23 "-Wno-missing-field-initializers", 24 "-Wno-missing-field-initializers",
24 "-Wvla", 25 "-Wvla",
25 ], 26 ],
26 rtti: true, 27 rtti: true,
27 28
28 clang_cflags: [
29 "-Wexit-time-destructors",
30 "-Wthread-safety",
31 ],
32
33 use_version_lib: true, 29 use_version_lib: true,
34 30
35 compile_multilib: "first", 31 compile_multilib: "first",
@@ -85,6 +81,12 @@ cc_defaults {
85 "-luserenv", 81 "-luserenv",
86 ], 82 ],
87 }, 83 },
84
85 not_windows: {
86 cflags: [
87 "-Wthread-safety",
88 ],
89 },
88 }, 90 },
89} 91}
90 92
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index 3be99f635..fe0ecd6ea 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -41,16 +41,8 @@
41 41
42// Some printf-like functions are implemented in terms of 42// Some printf-like functions are implemented in terms of
43// android::base::StringAppendV, so they should use the same attribute for 43// android::base::StringAppendV, so they should use the same attribute for
44// compile-time format string checking. On Windows, if the mingw version of 44// compile-time format string checking.
45// vsnprintf is used in StringAppendV, use `gnu_printf' which allows z in %zd
46// and PRIu64 (and related) to be recognized by the compile-time checking.
47#define ADB_FORMAT_ARCHETYPE __printf__ 45#define ADB_FORMAT_ARCHETYPE __printf__
48#ifdef __USE_MINGW_ANSI_STDIO
49#if __USE_MINGW_ANSI_STDIO
50#undef ADB_FORMAT_ARCHETYPE
51#define ADB_FORMAT_ARCHETYPE gnu_printf
52#endif
53#endif
54 46
55#ifdef _WIN32 47#ifdef _WIN32
56 48