blob: 5d6187233376a53350a8b002c8ae0a1323907e12 [file] [log] [blame]
Colin Cross4d9c2d12016-07-29 12:48:20 -07001// Copyright 2016 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
15package cc
16
17import (
18 "fmt"
Colin Crossfb44cd22022-09-09 15:11:16 -070019 "strings"
Colin Cross4d9c2d12016-07-29 12:48:20 -070020
Colin Cross4d9c2d12016-07-29 12:48:20 -070021 "android/soong/android"
Jingwen Chen8c1b97e2021-02-18 03:21:34 -050022 "android/soong/bazel"
Chris Parsonsf874e462022-05-10 13:50:12 -040023 "android/soong/bazel/cquery"
Colin Cross4d9c2d12016-07-29 12:48:20 -070024)
25
26//
27// Objects (for crt*.o)
28//
29
30func init() {
Colin Crosse40b4ea2018-10-02 22:25:58 -070031 android.RegisterModuleType("cc_object", ObjectFactory)
Martin Stjernholmcd07bce2020-03-10 22:37:59 +000032 android.RegisterSdkMemberType(ccObjectSdkMemberType)
Jingwen Chen8c1b97e2021-02-18 03:21:34 -050033
Martin Stjernholmcd07bce2020-03-10 22:37:59 +000034}
35
36var ccObjectSdkMemberType = &librarySdkMemberType{
37 SdkMemberTypeBase: android.SdkMemberTypeBase{
38 PropertyName: "native_objects",
39 SupportsSdk: true,
40 },
41 prebuiltModuleType: "cc_prebuilt_object",
Colin Cross4d9c2d12016-07-29 12:48:20 -070042}
43
44type objectLinker struct {
Colin Crossb916a382016-07-29 17:28:03 -070045 *baseLinker
Colin Cross4d9c2d12016-07-29 12:48:20 -070046 Properties ObjectLinkerProperties
Dan Albert5b0d4f32023-04-04 23:22:11 +000047
48 // Location of the object in the sysroot. Empty if the object is not
49 // included in the NDK.
50 ndkSysrootPath android.Path
Colin Cross4d9c2d12016-07-29 12:48:20 -070051}
52
Chris Parsons8d6e4332021-02-22 16:13:50 -050053type objectBazelHandler struct {
Chris Parsons8d6e4332021-02-22 16:13:50 -050054 module *Module
55}
56
Chris Parsons6ce2cf92022-05-20 10:54:17 -040057var _ BazelHandler = (*objectBazelHandler)(nil)
58
Chris Parsonsf874e462022-05-10 13:50:12 -040059func (handler *objectBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
Liz Kammer8206d4f2021-03-03 16:40:52 -050060 bazelCtx := ctx.Config().BazelContext
Yu Liue4312402023-01-18 09:15:31 -080061 bazelCtx.QueueBazelRequest(label, cquery.GetOutputFiles, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
Chris Parsonsf874e462022-05-10 13:50:12 -040062}
Liz Kammer8206d4f2021-03-03 16:40:52 -050063
Chris Parsonsf874e462022-05-10 13:50:12 -040064func (handler *objectBazelHandler) ProcessBazelQueryResponse(ctx android.ModuleContext, label string) {
65 bazelCtx := ctx.Config().BazelContext
Yu Liue4312402023-01-18 09:15:31 -080066 objPaths, err := bazelCtx.GetOutputFiles(label, android.GetConfigKeyApexVariant(ctx, GetApexConfigKey(ctx)))
Chris Parsonsf874e462022-05-10 13:50:12 -040067 if err != nil {
68 ctx.ModuleErrorf(err.Error())
69 return
Liz Kammer8206d4f2021-03-03 16:40:52 -050070 }
Chris Parsonsf874e462022-05-10 13:50:12 -040071
72 if len(objPaths) != 1 {
73 ctx.ModuleErrorf("expected exactly one object file for '%s', but got %s", label, objPaths)
74 return
75 }
76
77 handler.module.outputFile = android.OptionalPathForPath(android.PathForBazelOut(ctx, objPaths[0]))
Chris Parsons8d6e4332021-02-22 16:13:50 -050078}
79
Pete Bentley74c9bba2019-08-16 20:25:06 +010080type ObjectLinkerProperties struct {
Colin Cross137d7da2021-06-21 16:41:29 -070081 // list of static library modules that should only provide headers for this module.
82 Static_libs []string `android:"arch_variant,variant_prepend"`
83
84 // list of shared library modules should only provide headers for this module.
Zi Wang9f609db2023-01-04 11:06:54 -080085 Shared_libs []string `android:"arch_variant,variant_prepend"`
Colin Cross137d7da2021-06-21 16:41:29 -070086
Pete Bentley74c9bba2019-08-16 20:25:06 +010087 // list of modules that should only provide headers for this module.
88 Header_libs []string `android:"arch_variant,variant_prepend"`
89
Colin Cross137d7da2021-06-21 16:41:29 -070090 // list of default libraries that will provide headers for this module. If unset, generally
91 // defaults to libc, libm, and libdl. Set to [] to prevent using headers from the defaults.
Colin Cross6b8f4252021-07-22 11:39:44 -070092 System_shared_libs []string `android:"arch_variant"`
Colin Cross137d7da2021-06-21 16:41:29 -070093
Pete Bentley74c9bba2019-08-16 20:25:06 +010094 // names of other cc_object modules to link into this module using partial linking
95 Objs []string `android:"arch_variant"`
96
97 // if set, add an extra objcopy --prefix-symbols= step
98 Prefix_symbols *string
99
100 // if set, the path to a linker script to pass to ld -r when combining multiple object files.
101 Linker_script *string `android:"path,arch_variant"`
Dan Albert92fe7402020-07-15 13:33:30 -0700102
103 // Indicates that this module is a CRT object. CRT objects will be split
104 // into a variant per-API level between min_sdk_version and current.
105 Crt *bool
Dan Albert5b0d4f32023-04-04 23:22:11 +0000106
107 // Indicates that this module should not be included in the NDK sysroot.
108 // Only applies to CRT objects. Defaults to false.
109 Exclude_from_ndk_sysroot *bool
Pete Bentley74c9bba2019-08-16 20:25:06 +0100110}
111
Colin Cross7cabd422021-06-25 14:21:04 -0700112func newObject(hod android.HostOrDeviceSupported) *Module {
113 module := newBaseModule(hod, android.MultilibBoth)
Martin Stjernholm0b92ac82020-03-11 21:45:49 +0000114 module.sanitize = &sanitize{}
115 module.stl = &stl{}
116 return module
117}
118
Patrice Arrudabaff0ce2019-03-26 10:39:49 -0700119// cc_object runs the compiler without running the linker. It is rarely
120// necessary, but sometimes used to generate .s files from .c files to use as
121// input to a cc_genrule module.
Colin Crosse40b4ea2018-10-02 22:25:58 -0700122func ObjectFactory() android.Module {
Colin Cross7cabd422021-06-25 14:21:04 -0700123 module := newObject(android.HostAndDeviceSupported)
Colin Crossb916a382016-07-29 17:28:03 -0700124 module.linker = &objectLinker{
Peter Collingbourne1c648b82019-09-26 12:24:45 -0700125 baseLinker: NewBaseLinker(module.sanitize),
Colin Crossb916a382016-07-29 17:28:03 -0700126 }
127 module.compiler = NewBaseCompiler()
Chris Parsons8d6e4332021-02-22 16:13:50 -0500128 module.bazelHandler = &objectBazelHandler{module: module}
Peter Collingbourne486e42c2018-10-25 10:53:44 -0700129
130 // Clang's address-significance tables are incompatible with ld -r.
131 module.compiler.appendCflags([]string{"-fno-addrsig"})
132
Martin Stjernholmcd07bce2020-03-10 22:37:59 +0000133 module.sdkMemberTypes = []android.SdkMemberType{ccObjectSdkMemberType}
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500134
Liz Kammerbe46fcc2021-11-01 15:32:43 -0400135 module.bazelable = true
Colin Cross4d9c2d12016-07-29 12:48:20 -0700136 return module.Init()
137}
138
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500139// For bp2build conversion.
140type bazelObjectAttributes struct {
Chris Parsonsa37e1952021-09-28 16:47:36 -0400141 Srcs bazel.LabelListAttribute
142 Srcs_as bazel.LabelListAttribute
143 Hdrs bazel.LabelListAttribute
Colin Cross65ebc422022-12-05 21:18:13 -0800144 Objs bazel.LabelListAttribute
Chris Parsonsa37e1952021-09-28 16:47:36 -0400145 Deps bazel.LabelListAttribute
146 System_dynamic_deps bazel.LabelListAttribute
147 Copts bazel.StringListAttribute
148 Asflags bazel.StringListAttribute
149 Local_includes bazel.StringListAttribute
150 Absolute_includes bazel.StringListAttribute
151 Stl *string
152 Linker_script bazel.LabelAttribute
Sam Delmerico3fad8ed2023-01-25 16:52:36 -0500153 Crt *bool
Yu Liufc603162022-03-01 15:44:08 -0800154 sdkAttributes
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500155}
156
Liz Kammerbe46fcc2021-11-01 15:32:43 -0400157// objectBp2Build is the bp2build converter from cc_object modules to the
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500158// Bazel equivalent target, plus any necessary include deps for the cc_object.
Liz Kammerbe46fcc2021-11-01 15:32:43 -0400159func objectBp2Build(ctx android.TopDownMutatorContext, m *Module) {
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500160 if m.compiler == nil {
161 // a cc_object must have access to the compiler decorator for its props.
162 ctx.ModuleErrorf("compiler must not be nil for a cc_object module")
163 }
164
Jingwen Chen5d864492021-02-24 07:20:12 -0500165 // Set arch-specific configurable attributes
Liz Kammere6583482021-10-19 13:56:10 -0400166 baseAttributes := bp2BuildParseBaseProps(ctx, m)
167 compilerAttrs := baseAttributes.compilerAttributes
Colin Cross65ebc422022-12-05 21:18:13 -0800168 var objs bazel.LabelListAttribute
Jingwen Chen07027912021-03-15 06:02:43 -0400169 var deps bazel.LabelListAttribute
Chris Parsonsa37e1952021-09-28 16:47:36 -0400170 systemDynamicDeps := bazel.LabelListAttribute{ForceSpecifyEmptyList: true}
171
172 var linkerScript bazel.LabelAttribute
173
174 for axis, configToProps := range m.GetArchVariantProperties(ctx, &ObjectLinkerProperties{}) {
175 for config, props := range configToProps {
176 if objectLinkerProps, ok := props.(*ObjectLinkerProperties); ok {
177 if objectLinkerProps.Linker_script != nil {
Chris Parsons58852a02021-12-09 18:10:18 -0500178 label := android.BazelLabelForModuleSrcSingle(ctx, *objectLinkerProps.Linker_script)
179 linkerScript.SetSelectValue(axis, config, label)
Chris Parsonsa37e1952021-09-28 16:47:36 -0400180 }
Colin Cross65ebc422022-12-05 21:18:13 -0800181 objs.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Objs))
Chris Parsonsa37e1952021-09-28 16:47:36 -0400182 systemSharedLibs := objectLinkerProps.System_shared_libs
183 if len(systemSharedLibs) > 0 {
184 systemSharedLibs = android.FirstUniqueStrings(systemSharedLibs)
185 }
186 systemDynamicDeps.SetSelectValue(axis, config, bazelLabelForSharedDeps(ctx, systemSharedLibs))
Colin Cross65ebc422022-12-05 21:18:13 -0800187 deps.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Static_libs))
188 deps.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Shared_libs))
189 deps.SetSelectValue(axis, config, android.BazelLabelForModuleDeps(ctx, objectLinkerProps.Header_libs))
Zi Wang9f609db2023-01-04 11:06:54 -0800190 // static_libs, shared_libs, and header_libs have variant_prepend tag
191 deps.Prepend = true
Chris Parsonsa37e1952021-09-28 16:47:36 -0400192 }
Jingwen Chendb120242021-02-23 00:46:47 -0500193 }
194 }
Colin Cross65ebc422022-12-05 21:18:13 -0800195 objs.ResolveExcludes()
Jingwen Chendb120242021-02-23 00:46:47 -0500196
Chris Parsons990c4f42021-05-25 12:10:58 -0400197 // Don't split cc_object srcs across languages. Doing so would add complexity,
198 // and this isn't typically done for cc_object.
199 srcs := compilerAttrs.srcs
200 srcs.Append(compilerAttrs.cSrcs)
Chris Parsons69fa9f92021-07-13 11:47:44 -0400201
202 asFlags := compilerAttrs.asFlags
203 if compilerAttrs.asSrcs.IsEmpty() {
204 // Skip asflags for BUILD file simplicity if there are no assembly sources.
205 asFlags = bazel.MakeStringListAttribute(nil)
206 }
Chris Parsons990c4f42021-05-25 12:10:58 -0400207
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500208 attrs := &bazelObjectAttributes{
Chris Parsonsa37e1952021-09-28 16:47:36 -0400209 Srcs: srcs,
210 Srcs_as: compilerAttrs.asSrcs,
Colin Cross65ebc422022-12-05 21:18:13 -0800211 Objs: objs,
Chris Parsonsa37e1952021-09-28 16:47:36 -0400212 Deps: deps,
213 System_dynamic_deps: systemDynamicDeps,
214 Copts: compilerAttrs.copts,
215 Asflags: asFlags,
216 Local_includes: compilerAttrs.localIncludes,
217 Absolute_includes: compilerAttrs.absoluteIncludes,
218 Stl: compilerAttrs.stl,
219 Linker_script: linkerScript,
Sam Delmerico3fad8ed2023-01-25 16:52:36 -0500220 Crt: m.linker.(*objectLinker).Properties.Crt,
Yu Liufc603162022-03-01 15:44:08 -0800221 sdkAttributes: bp2BuildParseSdkAttributes(m),
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500222 }
223
Liz Kammerfc46bc12021-02-19 11:06:17 -0500224 props := bazel.BazelTargetModuleProperties{
225 Rule_class: "cc_object",
Liz Kammer2b376bc2022-01-12 12:00:49 -0500226 Bzl_load_location: "//build/bazel/rules/cc:cc_object.bzl",
Liz Kammerfc46bc12021-02-19 11:06:17 -0500227 }
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500228
Spandan Das39b6cc52023-04-12 19:05:49 +0000229 tags := android.ApexAvailableTagsWithoutTestApexes(ctx, m)
Sam Delmericoeddd3c02022-12-02 17:31:58 -0500230
231 ctx.CreateBazelTargetModule(props, android.CommonAttributes{
232 Name: m.Name(),
233 Tags: tags,
234 }, attrs)
Jingwen Chen8c1b97e2021-02-18 03:21:34 -0500235}
236
Colin Cross4d9c2d12016-07-29 12:48:20 -0700237func (object *objectLinker) appendLdflags(flags []string) {
Jeff Gastonaf3cc2d2017-09-27 17:01:44 -0700238 panic(fmt.Errorf("appendLdflags on objectLinker not supported"))
Colin Cross4d9c2d12016-07-29 12:48:20 -0700239}
240
Colin Cross42742b82016-08-01 13:20:05 -0700241func (object *objectLinker) linkerProps() []interface{} {
Colin Cross4d9c2d12016-07-29 12:48:20 -0700242 return []interface{}{&object.Properties}
243}
244
Colin Cross42742b82016-08-01 13:20:05 -0700245func (*objectLinker) linkerInit(ctx BaseModuleContext) {}
Colin Cross4d9c2d12016-07-29 12:48:20 -0700246
Colin Cross37047f12016-12-13 17:06:13 -0800247func (object *objectLinker) linkerDeps(ctx DepsContext, deps Deps) Deps {
Paul Duffina37832a2019-07-18 12:31:26 +0100248 deps.HeaderLibs = append(deps.HeaderLibs, object.Properties.Header_libs...)
Colin Cross137d7da2021-06-21 16:41:29 -0700249 deps.SharedLibs = append(deps.SharedLibs, object.Properties.Shared_libs...)
250 deps.StaticLibs = append(deps.StaticLibs, object.Properties.Static_libs...)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700251 deps.ObjFiles = append(deps.ObjFiles, object.Properties.Objs...)
Colin Cross137d7da2021-06-21 16:41:29 -0700252
Colin Cross6b8f4252021-07-22 11:39:44 -0700253 deps.SystemSharedLibs = object.Properties.System_shared_libs
Colin Cross137d7da2021-06-21 16:41:29 -0700254 if deps.SystemSharedLibs == nil {
Colin Cross6b8f4252021-07-22 11:39:44 -0700255 // Provide a default set of shared libraries if system_shared_libs is unspecified.
Colin Cross137d7da2021-06-21 16:41:29 -0700256 // Note: If an empty list [] is specified, it implies that the module declines the
257 // default shared libraries.
258 deps.SystemSharedLibs = append(deps.SystemSharedLibs, ctx.toolchain().DefaultSharedLibraries()...)
259 }
260 deps.LateSharedLibs = append(deps.LateSharedLibs, deps.SystemSharedLibs...)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700261 return deps
262}
263
Pete Bentley74c9bba2019-08-16 20:25:06 +0100264func (object *objectLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
Colin Cross33bac242021-07-14 17:03:16 -0700265 flags.Global.LdFlags = append(flags.Global.LdFlags, ctx.toolchain().ToolchainLdflags())
Colin Cross4d9c2d12016-07-29 12:48:20 -0700266
Pete Bentley74c9bba2019-08-16 20:25:06 +0100267 if lds := android.OptionalPathForModuleSrc(ctx, object.Properties.Linker_script); lds.Valid() {
Colin Cross4af21ed2019-11-04 09:37:55 -0800268 flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-T,"+lds.String())
Pete Bentley74c9bba2019-08-16 20:25:06 +0100269 flags.LdFlagsDeps = append(flags.LdFlagsDeps, lds.Path())
270 }
Colin Cross4d9c2d12016-07-29 12:48:20 -0700271 return flags
272}
273
274func (object *objectLinker) link(ctx ModuleContext,
Dan Willemsen5cb580f2016-09-26 17:33:01 -0700275 flags Flags, deps PathDeps, objs Objects) android.Path {
Colin Cross4d9c2d12016-07-29 12:48:20 -0700276
Dan Willemsen5cb580f2016-09-26 17:33:01 -0700277 objs = objs.Append(deps.Objs)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700278
Dan Albert5b0d4f32023-04-04 23:22:11 +0000279 var output android.WritablePath
Dan Willemsenefb1dd92017-09-18 22:47:20 -0700280 builderFlags := flagsToBuilderFlags(flags)
Colin Crossfb44cd22022-09-09 15:11:16 -0700281 outputName := ctx.ModuleName()
282 if !strings.HasSuffix(outputName, objectExtension) {
283 outputName += objectExtension
284 }
Dan Willemsenefb1dd92017-09-18 22:47:20 -0700285
Dan Albert5b0d4f32023-04-04 23:22:11 +0000286 // isForPlatform is terribly named and actually means isNotApex.
287 if Bool(object.Properties.Crt) &&
288 !Bool(object.Properties.Exclude_from_ndk_sysroot) && ctx.useSdk() &&
289 ctx.isSdkVariant() && ctx.isForPlatform() {
Dan Willemsenefb1dd92017-09-18 22:47:20 -0700290
Dan Albert5b0d4f32023-04-04 23:22:11 +0000291 output = getVersionedLibraryInstallPath(ctx,
292 nativeApiLevelOrPanic(ctx, ctx.sdkVersion())).Join(ctx, outputName)
293 object.ndkSysrootPath = output
294 } else {
295 output = android.PathForModuleOut(ctx, outputName)
296 }
297
298 outputFile := output
299
300 if len(objs.objFiles) == 1 && String(object.Properties.Linker_script) == "" {
Nan Zhang0007d812017-11-07 10:57:05 -0800301 if String(object.Properties.Prefix_symbols) != "" {
Colin Crossfb44cd22022-09-09 15:11:16 -0700302 transformBinaryPrefixSymbols(ctx, String(object.Properties.Prefix_symbols), objs.objFiles[0],
303 builderFlags, output)
304 } else {
305 ctx.Build(pctx, android.BuildParams{
306 Rule: android.Cp,
307 Input: objs.objFiles[0],
308 Output: output,
309 })
310 }
311 } else {
Colin Crossfb44cd22022-09-09 15:11:16 -0700312 if String(object.Properties.Prefix_symbols) != "" {
313 input := android.PathForModuleOut(ctx, "unprefixed", outputName)
Chris Parsonsbf4f55f2020-11-23 17:02:44 -0500314 transformBinaryPrefixSymbols(ctx, String(object.Properties.Prefix_symbols), input,
Dan Willemsenefb1dd92017-09-18 22:47:20 -0700315 builderFlags, output)
316 output = input
317 }
318
Chris Parsonsbf4f55f2020-11-23 17:02:44 -0500319 transformObjsToObj(ctx, objs.objFiles, builderFlags, output, flags.LdFlagsDeps)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700320 }
321
322 ctx.CheckbuildFile(outputFile)
323 return outputFile
324}
Jiyong Parkaf6d8952019-01-31 12:21:23 +0900325
Colin Cross137d7da2021-06-21 16:41:29 -0700326func (object *objectLinker) linkerSpecifiedDeps(specifiedDeps specifiedDeps) specifiedDeps {
327 specifiedDeps.sharedLibs = append(specifiedDeps.sharedLibs, object.Properties.Shared_libs...)
328
Colin Cross6b8f4252021-07-22 11:39:44 -0700329 // Must distinguish nil and [] in system_shared_libs - ensure that [] in
Colin Cross137d7da2021-06-21 16:41:29 -0700330 // either input list doesn't come out as nil.
Colin Cross6b8f4252021-07-22 11:39:44 -0700331 if specifiedDeps.systemSharedLibs == nil {
332 specifiedDeps.systemSharedLibs = object.Properties.System_shared_libs
Colin Cross137d7da2021-06-21 16:41:29 -0700333 } else {
Colin Cross6b8f4252021-07-22 11:39:44 -0700334 specifiedDeps.systemSharedLibs = append(specifiedDeps.systemSharedLibs, object.Properties.System_shared_libs...)
Colin Cross137d7da2021-06-21 16:41:29 -0700335 }
336
337 return specifiedDeps
338}
339
Jiyong Parkaf6d8952019-01-31 12:21:23 +0900340func (object *objectLinker) unstrippedOutputFilePath() android.Path {
341 return nil
342}
Pirama Arumuga Nainar65c95ff2019-03-25 10:21:31 -0700343
344func (object *objectLinker) nativeCoverage() bool {
345 return true
346}
Jiyong Parkee9a98d2019-08-09 14:44:36 +0900347
348func (object *objectLinker) coverageOutputFilePath() android.OptionalPath {
349 return android.OptionalPath{}
350}
Inseob Kim1042d292020-06-01 23:23:05 +0900351
352func (object *objectLinker) object() bool {
353 return true
354}
Dan Albert92fe7402020-07-15 13:33:30 -0700355
356func (object *objectLinker) isCrt() bool {
357 return Bool(object.Properties.Crt)
358}