[PATCH] D56180: Replace gen_dynamic_list.py with a portable shell script
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 1 06:38:05 PST 2019
krytarowski added a comment.
In D56180#1343094 <https://reviews.llvm.org/D56180#1343094>, @compnerd wrote:
> Shell is not available on Windows, python however is considered a portable shell within the project. There are a number of tools within the LLVM project that require python, I'm not sure that removing the dependency is the right thing to do here.
It's not portable enough to be kept as a build dependency (it's fine for tests and auxiliary infrastructure). I need to replace it with something else.
Python is not a base of any BSD and every project integrating `gen_dynamic_list` will need to reinvent/replace this Python script. It's the current case with NetBSD.
As an alternative to shell, I can write it fully with `awk(1)` (+ `nm(1)`, `file(1)`) but it will probably face the same concern as `sh(1)`.
In D56180#1343123 <https://reviews.llvm.org/D56180#1343123>, @mgorny wrote:
> Alternatively, I think this could be implemented in CMake script.
In the end I'm replacing CMake with BSD Makefiles too. I'm aware that CMake isn't used by at least RTEMS too.
Not sure if I can express this script with CMake rules (at least few years ago it used to be at least impracticably difficult to script with CMake, if possible at all).
A hybrid solution of keeping this .sh file around in upstream repo is fine too.
I can write a C program that is built as a tool and generates these `.syms` files (and calls with `system(3)` (C89 call) and assume that there is available `nm(1)` and `file(1)`).
If there is no interest upstream I can keep the shell script downstream.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56180/new/
https://reviews.llvm.org/D56180
More information about the llvm-commits
mailing list