Skip to content

Commit

Permalink
run clang without default config (#53)
Browse files Browse the repository at this point in the history
* run clang without default config

clang can be installed with a system-wide config-file which might add unexpected includes files in the chain. Those files will result in an undefined location when querying the index, let's avoid that problem by configuring clang to be executed without a default config file

* Use macOS-latest

* Remove OSX for now

---------

Co-authored-by: AU <[email protected]>
  • Loading branch information
efferre79 and adam-urbanczyk authored Mar 17, 2024
1 parent f3bcde7 commit 84d5629
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ jobs:
parameters:
name: Windows
vmImage: 'windows-2019'
- template: build-bindings-job.yml
parameters:
name: OSX
vmImage: 'macOS-10.15'
5 changes: 5 additions & 0 deletions bindgen/translation_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def parse_tu(path,
for inc in platform_includes:
args.append(f'-I{inc}')

# if clang is configured with a system-wide config file, then some additional
# unexpected headers might be added by the indexer during parsing and those ones will
# have a None filename location
args.append('--no-default-config')

ix = get_index()

with open(path) as f:
Expand Down

0 comments on commit 84d5629

Please sign in to comment.