Index: third_party/libusb/BUILD.gn |
diff --git a/third_party/libusb/BUILD.gn b/third_party/libusb/BUILD.gn |
index cce639ea327da46bc41dc93d6468770a284f4bd0..82aeabd3790b918739d20f690143322320ec31cc 100644 |
--- a/third_party/libusb/BUILD.gn |
+++ b/third_party/libusb/BUILD.gn |
@@ -10,6 +10,17 @@ config("libusb_config") { |
include_dirs = [ "src/libusb" ] |
} |
+config("libusb_warnings") { |
+ visibility = [ ":*" ] |
+ if (is_clang) { |
+ # guid_eq in windows_usb.c is unused. |
+ cflags = [ "-Wno-unused-function" ] |
+ if (is_linux && !use_udev) { |
+ cflags += [ "-Wno-pointer-sign" ] |
+ } |
+ } |
+} |
+ |
static_library("libusb") { |
sources = [ |
"src/config.h", |
@@ -46,15 +57,6 @@ static_library("libusb") { |
deps = [] |
include_dirs = [ "src/libusb/os" ] |
- config("libusb_warnings") { |
- if (is_clang) { |
- # guid_eq in windows_usb.c is unused. |
- cflags = [ "-Wno-unused-function" ] |
- if (is_linux && !use_udev) { |
- cflags += [ "-Wno-pointer-sign" ] |
- } |
- } |
- } |
configs -= [ "//build/config/compiler:chromium_code" ] |
configs += [ "//build/config/compiler:no_chromium_code" ] |
configs += [ ":libusb_warnings" ] |