1package { 2 default_applicable_licenses: ["external_elfutils_license"], 3} 4 5genrule { 6 name: "i386_mnemonics", 7 srcs: [ 8 "defs/i386", 9 ], 10 out: ["i386.mnemonics"], 11 cmd: "M4=$(location m4) $(location android_mnemonic_preprocess.sh) i386 $(in) $(out)", 12 tool_files: [ 13 "android_mnemonic_preprocess.sh", 14 ], 15 tools : [ 16 "m4", 17 ] 18} 19 20genrule { 21 name: "x86_64_mnemonics", 22 srcs : [ 23 "defs/i386", 24 ], 25 out : ["x86_64.mnemonics"], 26 cmd : "M4=$(location m4) $(location android_mnemonic_preprocess.sh) x86_64 $(in) $(out)", 27 tool_files : [ 28 "android_mnemonic_preprocess.sh", 29 ], 30 tools : [ 31 "m4", 32 ] 33} 34 35cc_binary_host { 36 name: "i386_gendis", 37 defaults: ["elfutils_defaults"], 38 srcs: [ 39 "i386_parse.y", 40 "i386_lex.l", 41 "i386_gendis.c", 42 ], 43 yacc: { 44 flags: ["-pi386_",] 45 }, 46 lex: { 47 flags: ["-Pi386_",] 48 }, 49 static_libs: [ 50 "libeu", 51 ], 52 target: { 53 musl: { 54 static_libs: ["libobstack"], 55 }, 56 }, 57} 58 59genrule { 60 name: "i386_dis", 61 srcs: [ 62 "defs/i386", 63 ], 64 out: ["i386_dis.h"], 65 cmd: "$(location m4) -Di386 -DDISASSEMBLER $(in) > $(genDir)/i386_defs && $(location i386_gendis) $(genDir)/i386_defs > $(out)", 66 tools: [ 67 "i386_gendis", 68 "m4", 69 ], 70} 71 72genrule { 73 name: "x86_64_dis", 74 srcs: [ 75 "defs/i386", 76 ], 77 out: ["x86_64_dis.h"], 78 cmd: "$(location m4) -Dx86_64 -DDISASSEMBLER $(in) > $(genDir)/x86_64_defs && $(location i386_gendis) $(genDir)/x86_64_defs > $(out)", 79 tools: [ 80 "i386_gendis", 81 "m4", 82 ], 83} 84