blob: 0a15112d5ece09e4297e81f61172830e361d39b6 [file] [log] [blame]
Paul Duffin1c6c1c72020-02-21 10:28:43 +00001// Copyright 2020 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 "android/soong/android"
18
19func init() {
20 RegisterLibraryHeadersBuildComponents(android.InitRegistrationContext)
21}
22
23func RegisterLibraryHeadersBuildComponents(ctx android.RegistrationContext) {
24 ctx.RegisterModuleType("cc_library_headers", LibraryHeaderFactory)
25}
26
27// cc_library_headers contains a set of c/c++ headers which are imported by
28// other soong cc modules using the header_libs property. For best practices,
29// use export_include_dirs property or LOCAL_EXPORT_C_INCLUDE_DIRS for
30// Make.
31func LibraryHeaderFactory() android.Module {
32 module, library := NewLibrary(android.HostAndDeviceSupported)
33 library.HeaderOnly()
34 return module.Init()
35}