Add include path for systems with LLVM 11 (e.g. Debian 11) (#125)
diff --git a/bin/setup.dart b/bin/setup.dart
index edc79e2..9949ebc 100644
--- a/bin/setup.dart
+++ b/bin/setup.dart
@@ -10,7 +10,7 @@
///
/// Linux:
/// ```
-/// clang -I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -lclang -shared -fpic path/to/wrapper.c -o path/to/libwrapped_clang.so
+/// clang -I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -I/usr/lib/llvm-11/include/ -lclang -shared -fpic path/to/wrapper.c -o path/to/libwrapped_clang.so
/// ```
/// MacOS:
/// ```
@@ -39,6 +39,7 @@
headerIncludes: [
'-I/usr/lib/llvm-9/include/',
'-I/usr/lib/llvm-10/include/',
+ '-I/usr/lib/llvm-11/include/',
],
);
final _windowsOpts = _Options(
diff --git a/example/libclang-example/pubspec.yaml b/example/libclang-example/pubspec.yaml
index e1a3cfc..f45148f 100644
--- a/example/libclang-example/pubspec.yaml
+++ b/example/libclang-example/pubspec.yaml
@@ -24,7 +24,7 @@
- '**CXString.h'
- '**Index.h'
- compiler-opts: '-I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -IC:\Progra~1\LLVM\include -I/usr/local/opt/llvm/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ -Wno-nullability-completeness'
+ compiler-opts: '-I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -I/usr/lib/llvm-11/include/ -IC:\Progra~1\LLVM\include -I/usr/local/opt/llvm/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ -Wno-nullability-completeness'
functions:
include:
- 'clang_.*' # Can be a regexp, '.' matches any character.
diff --git a/test/example_tests/libclang_example_test.dart b/test/example_tests/libclang_example_test.dart
index ac3feab..dba380d 100644
--- a/test/example_tests/libclang_example_test.dart
+++ b/test/example_tests/libclang_example_test.dart
@@ -27,7 +27,7 @@
- '**CXString.h'
- '**Index.h'
-${strings.compilerOpts}: '-I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -IC:\Progra~1\LLVM\include -I/usr/local/opt/llvm/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ -Wno-nullability-completeness'
+${strings.compilerOpts}: '-I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -I/usr/lib/llvm-11/include/ -IC:\Progra~1\LLVM\include -I/usr/local/opt/llvm/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ -Wno-nullability-completeness'
${strings.functions}:
${strings.include}:
- 'clang_.*'
diff --git a/tool/libclang_config.yaml b/tool/libclang_config.yaml
index 4262736..7be7ec1 100644
--- a/tool/libclang_config.yaml
+++ b/tool/libclang_config.yaml
@@ -13,7 +13,7 @@
description: Holds bindings to LibClang.
output: 'lib/src/header_parser/clang_bindings/clang_bindings.dart'
sort: true
-compiler-opts: '-I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -I/usr/local/opt/llvm/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ -Wno-nullability-completeness'
+compiler-opts: '-I/usr/lib/llvm-9/include/ -I/usr/lib/llvm-10/include/ -I/usr/lib/llvm-11/include/ -I/usr/local/opt/llvm/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ -Wno-nullability-completeness'
headers:
entry-points:
- 'lib/src/clang_library/wrapper.c'