1// Copyright 2022 Google Inc. All Rights Reserved. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto2"; 16 17package symbols_map; 18option go_package = "android/soong/cmd/symbols_map/symbols_map_proto"; 19 20message Mapping { 21 // identifier is a unique identifier of a location, generally the hash of the file. For an 22 // elf file it is the elf build ID, for an R8 dictionary it is the hash from the comments in the 23 // top of the file. It may be empty if no hash could be extracted from the file. 24 optional string identifier = 1; 25 26 // location is the path to the file with the given identifier. The location should be valid 27 // both on the local disk and in the distributed symbols.zip or proguard_dict.zip files. 28 optional string location = 2; 29 30 // Type is the valid types of a mapping. 31 enum Type { 32 // ELF denotes a mapping from an elf build ID to an unstripped elf file. 33 ELF = 0; 34 // R8 denotes a mapping from an R8 dictionary hash to an R8 dictionary. 35 R8 = 1; 36 } 37 38 // type is the type of the mapping, either ELF or R8. 39 optional Type type = 3; 40 41 // LocationType is the place where to look for the file with the given 42 // identifier. 43 enum LocationType { 44 // ZIP denotes the file with the given identifier is in the distribuited 45 // symbols.zip or proguard_dict.zip files, or the local disc. 46 ZIP = 0; 47 // AB denotes the file with the given identifier is in the AB artifacts but 48 // not in a symbols.zip or proguard_dict.zip. 49 AB = 1; 50 } 51 52 // location_type is the Location Type that dictates where to search for the 53 // file with the given identifier. Defaults to ZIP if not present. 54 optional LocationType location_type = 4; 55} 56 57message Mappings { 58 repeated Mapping mappings = 4; 59} 60