summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-12-14 16:26:05 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-12-14 16:04:01 +0000
commite674a4e84e4ed1251d887ab826c34439ffcf4f5b (patch)
treeeab0cdbc2f09c72a27f2142959a5b170cccda841
parent61ff15f909c67499c1b860bc1c29e8c8a2616d66 (diff)
downloadqtwebengine-chromium-e674a4e84e4ed1251d887ab826c34439ffcf4f5b.tar.gz
Fix non-Google clang builds
Change-Id: I27d840de3ebf53b0791644a68083beb351631366 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--chromium/build/config/compiler/BUILD.gn3
-rw-r--r--chromium/content/common/quarantine/quarantine_mac.mm6
-rw-r--r--chromium/device/bluetooth/bluetooth_adapter_mac.mm2
-rw-r--r--chromium/net/cert/x509_util_mac.cc3
-rw-r--r--chromium/net/ssl/ssl_platform_key_mac.cc2
-rw-r--r--chromium/services/shape_detection/barcode_detection_impl_mac.mm2
-rw-r--r--chromium/services/shape_detection/text_detection_impl_mac.mm2
7 files changed, 11 insertions, 9 deletions
diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
index a09a2db20e1..479c33cd0fd 100644
--- a/chromium/build/config/compiler/BUILD.gn
+++ b/chromium/build/config/compiler/BUILD.gn
@@ -262,6 +262,7 @@ config("compiler") {
if (use_qt && is_clang) {
cflags += [
"-Wno-unknown-attributes",
+ "-Wno-unknown-pragmas",
"-Wno-unknown-warning-option"
]
cflags_cc += [
@@ -444,7 +445,7 @@ config("compiler") {
# TODO(hans): Remove this once Clang generates better optimized debug info by
# default. https://crbug.com/765793
if (is_clang && !is_nacl && current_toolchain == host_toolchain &&
- target_os != "chromeos") {
+ target_os != "chromeos" && !use_qt) {
cflags += [
"-Xclang",
"-mllvm",
diff --git a/chromium/content/common/quarantine/quarantine_mac.mm b/chromium/content/common/quarantine/quarantine_mac.mm
index b8302baf779..f3adef225b0 100644
--- a/chromium/content/common/quarantine/quarantine_mac.mm
+++ b/chromium/content/common/quarantine/quarantine_mac.mm
@@ -236,7 +236,7 @@ bool AddQuarantineMetadataToFile(const base::FilePath& file,
base::ThreadRestrictions::AssertIOAllowed();
base::scoped_nsobject<NSMutableDictionary> properties;
bool success = false;
- if (@available(macos 10.10, *)) {
+ if (base::mac::IsAtLeastOS10_10()) {
success = GetQuarantineProperties(file, &properties);
} else {
#if !defined(MAC_OS_X_VERSION_10_10) || \
@@ -283,7 +283,7 @@ bool AddQuarantineMetadataToFile(const base::FilePath& file,
[properties setValue:origin_url forKey:(NSString*)kLSQuarantineDataURLKey];
}
- if (@available(macos 10.10, *)) {
+ if (base::mac::IsAtLeastOS10_10()) {
return SetQuarantineProperties(file, properties);
} else {
#if !defined(MAC_OS_X_VERSION_10_10) || \
@@ -322,7 +322,7 @@ bool IsFileQuarantined(const base::FilePath& file,
base::scoped_nsobject<NSMutableDictionary> properties;
bool success = false;
- if (@available(macos 10.10, *)) {
+ if (base::mac::IsAtLeastOS10_10()) {
success = GetQuarantineProperties(file, &properties);
} else {
#if !defined(MAC_OS_X_VERSION_10_10) || \
diff --git a/chromium/device/bluetooth/bluetooth_adapter_mac.mm b/chromium/device/bluetooth/bluetooth_adapter_mac.mm
index b01cc27cfbe..036c12da258 100644
--- a/chromium/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/chromium/device/bluetooth/bluetooth_adapter_mac.mm
@@ -77,7 +77,7 @@ base::WeakPtr<BluetoothAdapterMac> BluetoothAdapterMac::CreateAdapterForTest(
// static
BluetoothUUID BluetoothAdapterMac::BluetoothUUIDWithCBUUID(CBUUID* uuid) {
// UUIDString only available OS X >= 10.10.
- if (@available(macOS 10.10, *)) {
+ if (base::mac::IsAtLeastOS10_10()) {
std::string uuid_c_string = base::SysNSStringToUTF8([uuid UUIDString]);
return device::BluetoothUUID(uuid_c_string);
} else {
diff --git a/chromium/net/cert/x509_util_mac.cc b/chromium/net/cert/x509_util_mac.cc
index 51c5a19d2d8..f95e4d08557 100644
--- a/chromium/net/cert/x509_util_mac.cc
+++ b/chromium/net/cert/x509_util_mac.cc
@@ -7,6 +7,7 @@
#include <CommonCrypto/CommonDigest.h>
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/strings/sys_string_conversions.h"
#include "net/cert/x509_certificate.h"
#include "third_party/apple_apsl/cssmapplePriv.h"
@@ -202,7 +203,7 @@ OSStatus CreateBasicX509Policy(SecPolicyRef* policy) {
OSStatus CreateRevocationPolicies(bool enable_revocation_checking,
CFMutableArrayRef policies) {
- if (__builtin_available(macos 10.12, *)) {
+ if (base::mac::IsAtLeastOS10_12()) {
// On Sierra, it's not possible to disable network revocation checking
// without also breaking AIA. If revocation checking isn't explicitly
// enabled, just don't add a revocation policy.
diff --git a/chromium/net/ssl/ssl_platform_key_mac.cc b/chromium/net/ssl/ssl_platform_key_mac.cc
index 0a596de59b8..756bbe863c4 100644
--- a/chromium/net/ssl/ssl_platform_key_mac.cc
+++ b/chromium/net/ssl/ssl_platform_key_mac.cc
@@ -354,7 +354,7 @@ scoped_refptr<SSLPrivateKey> CreateSSLPrivateKeyForSecKey(
if (!GetClientCertInfo(certificate, &key_type, &max_length))
return nullptr;
- if (__builtin_available(macOS 10.12, *)) {
+ if (base::mac::IsAtLeastOS10_12()) {
return base::MakeRefCounted<ThreadedSSLPrivateKey>(
std::make_unique<SSLPlatformKeySecKey>(key_type, max_length,
private_key),
diff --git a/chromium/services/shape_detection/barcode_detection_impl_mac.mm b/chromium/services/shape_detection/barcode_detection_impl_mac.mm
index 1c198b8b0fb..86e07cabf49 100644
--- a/chromium/services/shape_detection/barcode_detection_impl_mac.mm
+++ b/chromium/services/shape_detection/barcode_detection_impl_mac.mm
@@ -19,7 +19,7 @@ namespace shape_detection {
void BarcodeDetectionImpl::Create(
shape_detection::mojom::BarcodeDetectionRequest request) {
// Barcode detection needs at least MAC OS X 10.10.
- if (@available(macOS 10.10, *)) {
+ if (base::mac::IsAtLeastOS10_10()) {
mojo::MakeStrongBinding(base::MakeUnique<BarcodeDetectionImplMac>(),
std::move(request));
}
diff --git a/chromium/services/shape_detection/text_detection_impl_mac.mm b/chromium/services/shape_detection/text_detection_impl_mac.mm
index 4a815f2b48d..f16a9335737 100644
--- a/chromium/services/shape_detection/text_detection_impl_mac.mm
+++ b/chromium/services/shape_detection/text_detection_impl_mac.mm
@@ -18,7 +18,7 @@ namespace shape_detection {
// static
void TextDetectionImpl::Create(mojom::TextDetectionRequest request) {
// Text detection needs at least MAC OS X 10.11.
- if (@available(macOS 10.11, *)) {
+ if (base::mac::IsAtLeastOS10_11()) {
mojo::MakeStrongBinding(base::MakeUnique<TextDetectionImplMac>(),
std::move(request));
}