From 1508648f30cbaf5a3590572b2313fb5b595a7946 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 15 Jan 2019 04:21:56 -0800 Subject: Build & fix the JIT. --- BUILD | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'BUILD') diff --git a/BUILD b/BUILD index 9e79d95..5804d36 100644 --- a/BUILD +++ b/BUILD @@ -11,6 +11,11 @@ load( "upb_proto_reflection_library", ) +config_setting( + name = "k8", + values = {"cpu": "k8"}, +) + # C/C++ rules ################################################################## cc_library( @@ -62,7 +67,15 @@ cc_library( "upb/pb/textprinter.c", "upb/pb/varint.c", "upb/pb/varint.int.h", - ], + ] + select({ + ":k8": [ + "upb/pb/compile_decoder_x64.c", + "upb/pb/compile_decoder_x64.h", + "third_party/dynasm/dasm_proto.h", + "third_party/dynasm/dasm_x86.h", + ], + "//conditions:default": [], + }), hdrs = [ "upb/pb/decoder.h", "upb/pb/encoder.h", @@ -72,7 +85,10 @@ cc_library( "-std=c89", "-pedantic", "-Wno-long-long", - ], + ] + select({ + ":k8": ["-DUPB_USE_JIT_X64"], + "//conditions:default": [], + }), deps = [ ":upb", ], -- cgit v1.2.3