blob: f10498b56dfc5bd22a99d566d19d452e8fc52d2d [file] [log] [blame]
# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
name: libclang_example
environment:
sdk: '>=2.13.0 <3.0.0'
dev_dependencies:
ffigen:
path: '../../'
lints: ^1.0.1
ffigen:
output: 'generated_bindings.dart'
# This will sort the bindings alphabetically.
# sort: true
# This is required if LLVM can't be found in default locations by ffigen.
# llvm-path:
# - '/usr/local/opt/llvm'
# Bash style Glob matching is also supported.
# TODO(11): Globs dont work on windows if they begin with '.' or '..'.
headers:
entry-points:
- ../../third_party/libclang/include/clang-c/Index.h
include-directives: # use glob syntax to match with header file path.
- '**CXString.h'
- '**Index.h'
compiler-opts:
- '-I../../third_party/libclang/include'
- '-Wno-nullability-completeness'
functions:
include:
- 'clang_.*' # Can be a regexp, '.' matches any character.
symbol-address:
include:
- 'clang_.*' # Symbol Address for these functions will be exposed via addresses.
expose-typedefs:
include:
- 'clang_.*' # Typedefs for Native and Dart type for these functions will be generated.
structs:
include:
- 'CX.*'
enums:
include:
- 'CXTypeKind' # Full names are given higher priority than regexp.
- 'CXGlobalOptFlags'
# These are optional and also default,
# Omitting any and the default will be used.
size-map:
char: 1
unsigned char: 1
short: 2
unsigned short: 2
int: 4
unsigned int: 4
long: 8
unsigned long: 8
long long: 8
unsigned long long: 8
enum: 4
# These can be used to map any typedef to a specific native type.
typedef-map:
'size_t': 'IntPtr'
'time_t': 'Int64'
# Default is 'NativeLibrary'
name: 'LibClang'
description: 'Holds bindings to LibClang.'
# Doc Comments for generated binings.
# Comments can be disabled by using comments: false
comments:
style: doxygen # Options - doxygen(default) / any.
length: full # Options - brief / full(default).
# The header of the file, this is pasted as it is.
preamble: |
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
// Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// ignore_for_file: camel_case_types, non_constant_identifier_names