Add support for native bridge trait
Adds a native bridge trait that if required will cause a cc_library_header module to generate a cc_prebuilt_library_headers with native_bridge_supported: true. It will fail if the cc_library_header's native bridge variant would produce native bridge specific properties, distinct from the other architecture variants, in the generated cc_prebuilt_library_headers. Bug: 195754365 Test: m nothing Change-Id: I282fbb9095de6c6af57cca4eb4260e2c6c2da8cc
This commit is contained in:
33
cc/native_bridge_sdk_trait.go
Normal file
33
cc/native_bridge_sdk_trait.go
Normal file
@@ -0,0 +1,33 @@
|
||||
// Copyright 2021 Google Inc. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package cc
|
||||
|
||||
import "android/soong/android"
|
||||
|
||||
// This file contains support for the native bridge sdk trait.
|
||||
|
||||
func init() {
|
||||
android.RegisterSdkMemberTrait(nativeBridgeSdkTrait)
|
||||
}
|
||||
|
||||
type nativeBridgeSdkTraitStruct struct {
|
||||
android.SdkMemberTraitBase
|
||||
}
|
||||
|
||||
var nativeBridgeSdkTrait android.SdkMemberTrait = &nativeBridgeSdkTraitStruct{
|
||||
SdkMemberTraitBase: android.SdkMemberTraitBase{
|
||||
PropertyName: "native_bridge_support",
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user