File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 ` ffi-native ` option.
66- Add ` retainAndReturnPointer ` method to ObjC objects and blocks, and add
77 ` castFromPointer ` method to blocks.
8+ - Add ` -Wno-nullability-completeness ` as default compiler option for MacOS.
89
910## 11.0.0
1011
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ headers:
2222compiler-opts :
2323 - ' -I../../third_party/libclang/include'
2424 - ' -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/'
25- - ' -Wno-nullability-completeness'
2625functions :
2726 include :
2827 - ' clang_.*' # Can be a regexp, '.' matches any character.
Original file line number Diff line number Diff line change @@ -347,11 +347,11 @@ class CompilerOptsAuto {
347347
348348 /// Extracts compiler options based on OS and config.
349349 List <String > extractCompilerOpts () {
350- if ( Platform .isMacOS && macIncludeStdLib) {
351- return getCStandardLibraryHeadersForMac ();
352- }
353-
354- return [ ];
350+ return [
351+ if ( Platform .isMacOS && macIncludeStdLib)
352+ ... getCStandardLibraryHeadersForMac (),
353+ if ( Platform .isMacOS) '-Wno-nullability-completeness' ,
354+ ];
355355 }
356356}
357357
Original file line number Diff line number Diff line change 22// for details. All rights reserved. Use of this source code is governed by a
33// BSD-style license that can be found in the LICENSE file.
44
5+ import 'dart:io' ;
6+
57import 'package:ffigen/ffigen.dart' ;
68import 'package:ffigen/src/config_provider/spec_utils.dart' ;
79import 'package:ffigen/src/strings.dart' as strings;
@@ -40,7 +42,12 @@ ${strings.compilerOptsAuto}:
4042 ${strings .macos }:
4143 ${strings .includeCStdLib }: false
4244 ''' );
43- expect (config.compilerOpts.isEmpty, true );
45+ expect (
46+ config.compilerOpts,
47+ equals ([
48+ if (Platform .isMacOS) '-Wno-nullability-completeness' ,
49+ ]),
50+ );
4451 });
4552 });
4653}
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ headers:
1515 include-directives :
1616 - ' **native_test.c'
1717
18- compiler-opts : ' -Wno-nullability-completeness'
1918preamble : |
2019 // ignore_for_file: camel_case_types, non_constant_identifier_names
2120
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ description: Holds bindings to LibClang.
1616output : ' ../lib/src/header_parser/clang_bindings/clang_bindings.dart'
1717compiler-opts :
1818 - ' -Ithird_party/libclang/include'
19- - ' -Wno-nullability-completeness'
2019headers :
2120 entry-points :
2221 - ' ../third_party/libclang/include/clang-c/Index.h'
You can’t perform that action at this time.
0 commit comments