diff options
author | William Deegan <bill@baddogconsulting.com> | 2023-06-20 16:09:35 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2023-06-20 16:09:35 (GMT) |
commit | aa2d2d3dab51a472dee8742e6e133c38a078144c (patch) | |
tree | 73dc0332340f58fafebd6bb90bd59ed2f40b5633 | |
parent | 38655bb5d62f72519684218dc45a727886cbc9bb (diff) | |
download | SCons-aa2d2d3dab51a472dee8742e6e133c38a078144c.zip SCons-aa2d2d3dab51a472dee8742e6e133c38a078144c.tar.gz SCons-aa2d2d3dab51a472dee8742e6e133c38a078144c.tar.bz2 |
Switch D Scanner logic to prefer .di over .d when satisfying includes per https://dlang.org/dmd-linux.html#interface-files
-rw-r--r-- | SCons/Scanner/D.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/SCons/Scanner/D.py b/SCons/Scanner/D.py index 9bc608f..fbb2894 100644 --- a/SCons/Scanner/D.py +++ b/SCons/Scanner/D.py @@ -48,9 +48,11 @@ class D(Classic): # translate dots (package separators) to slashes inc = include.replace('.', '/') - i = SCons.Node.FS.find_file(inc + '.d', (source_dir,) + path) + # According to https://dlang.org/dmd-linux.html#interface-files + # Prefer .di files over .d files when processing includes(imports) + i = SCons.Node.FS.find_file(inc + '.di', (source_dir,) + path) if i is None: - i = SCons.Node.FS.find_file(inc + '.di', (source_dir,) + path) + i = SCons.Node.FS.find_file(inc + '.d', (source_dir,) + path) return i, include def find_include_names(self, node): |