Skip to content

Commit

Permalink
[ffigen] Detect Scoop LLVM installation on Windows (dart-lang#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-hegde authored Mar 15, 2023
1 parent b26e13d commit d7eb3f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pkgs/ffigen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 7.2.9

- Detect LLVM installed using Scoop on Windows machines.

# 7.2.8

- Automatically generate `ignore_for_file: type=lint` if not specified in preamble.
Expand Down
8 changes: 7 additions & 1 deletion pkgs/ffigen/lib/src/config_provider/spec_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,13 @@ String findDylibAtDefaultLocations() {
}
}
} else if (Platform.isWindows) {
for (final l in strings.windowsDylibLocations) {
final dylibLocations = strings.windowsDylibLocations.toList();
final userHome = Platform.environment['USERPROFILE'];
if (userHome != null) {
dylibLocations
.add(p.join(userHome, 'scoop', 'apps', 'llvm', 'current', 'bin'));
}
for (final l in dylibLocations) {
k = findLibclangDylib(l);
if (k != null) return k;
}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/ffigen/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.

name: ffigen
version: 7.2.8
version: 7.2.9
description: Generator for FFI bindings, using LibClang to parse C header files.
repository: https://github.com/dart-lang/ffigen

Expand Down

0 comments on commit d7eb3f1

Please sign in to comment.