Index: third_party/leveldatabase/BUILD.gn |
diff --git a/third_party/leveldatabase/BUILD.gn b/third_party/leveldatabase/BUILD.gn |
index c8776c887c38929d645fd2f02a0c0879738f72c6..afdf8315bbdb0860e6116fc1edc3028c5eda4582 100644 |
--- a/third_party/leveldatabase/BUILD.gn |
+++ b/third_party/leveldatabase/BUILD.gn |
@@ -14,6 +14,21 @@ config("leveldatabase_config") { |
] |
} |
+source_set("leveldatabase_opts.sse42") { |
+ sources = [ |
+ "src/port/port_posix_sse.cc", |
+ ] |
+ |
+ configs += [ ":leveldatabase_config" ] |
+ |
+ if (target_cpu == "x86" || target_cpu == "x64") { |
+ defines += [ "LEVELDB_PLATFORM_POSIX_SSE=1" ] |
cmumford
2017/03/02 00:01:45
Can you remove the "=1"? The code only does a #ifd
pwnall
2017/03/02 00:28:24
Done.
|
+ if (!is_win || is_clang) { |
+ cflags = [ "-msse4.2" ] |
+ } |
+ } |
+} |
+ |
static_library("leveldatabase") { |
sources = [ |
"env_chromium.cc", |
@@ -108,6 +123,7 @@ static_library("leveldatabase") { |
public_configs = [ ":leveldatabase_config" ] |
deps = [ |
+ ":leveldatabase_opts.sse42", |
"//base", |
"//base/third_party/dynamic_annotations", |
"//third_party/re2", |