New guide --include-dir clarifications
Hi, A couple of points regarding --include-dir in the guide that I think are worth mentioning: 1. The directories are searched in order, so if the same header is found in more than one included dirs, only the first one is taken. (I think this is correct.) 2. The directories are *not* searched recursively. Nested directories need to be added one by one if required. If you agree that these should be added, I don't mind making a pull request. I think it's best to add this info in the "Running jextract" section. - Nir
Or should we just say that this is equivalent Clang compiler's -I option rather than repeating the specification in the jextract doc(s)/help? BTW, even Clang's command line reference does not seem to specify/commit to the precise behavior seen/you mentioned... https://clang.llvm.org/docs/ClangCommandLineReference.html -Sundar ________________________________ From: jextract-dev <jextract-dev-retn@openjdk.org> on behalf of Nir Lisker <nlisker@gmail.com> Sent: 17 April 2024 09:51 To: jextract-dev@openjdk.org <jextract-dev@openjdk.org> Subject: New guide --include-dir clarifications Hi, A couple of points regarding --include-dir in the guide that I think are worth mentioning: 1. The directories are searched in order, so if the same header is found in more than one included dirs, only the first one is taken. (I think this is correct.) 2. The directories are *not* searched recursively. Nested directories need to be added one by one if required. If you agree that these should be added, I don't mind making a pull request. I think it's best to add this info in the "Running jextract" section. - Nir
I think we could do a combination of the two: say that the value of the -I options is forwarded to clang (with a link to [1]), and then note the most important parts directly in the guide as well. Jorn [1]: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-I... On 17/04/2024 06:53, Sundararajan Athijegannathan wrote:
Or should we just say that this is equivalent Clang compiler's -I option rather than repeating the specification in the jextract doc(s)/help?
BTW, even Clang's command line reference does not seem to specify/commit to the precise behavior seen/you mentioned...
https://clang.llvm.org/docs/ClangCommandLineReference.html <https://clang.llvm.org/docs/ClangCommandLineReference.html>
-Sundar ------------------------------------------------------------------------ *From:* jextract-dev <jextract-dev-retn@openjdk.org> on behalf of Nir Lisker <nlisker@gmail.com> *Sent:* 17 April 2024 09:51 *To:* jextract-dev@openjdk.org <jextract-dev@openjdk.org> *Subject:* New guide --include-dir clarifications Hi,
A couple of points regarding --include-dir in the guide that I think are worth mentioning: 1. The directories are searched in order, so if the same header is found in more than one included dirs, only the first one is taken. (I think this is correct.) 2. The directories are *not* searched recursively. Nested directories need to be added one by one if required.
If you agree that these should be added, I don't mind making a pull request. I think it's best to add this info in the "Running jextract" section.
- Nir
participants (3)
-
Jorn Vernee
-
Nir Lisker
-
Sundararajan Athijegannathan