Michael Kruse via llvm-dev
2019-Jul-10 16:08 UTC
[llvm-dev] Python build dependency in LLVM and/or clang?
Am Fr., 5. Juli 2019 um 07:01 Uhr schrieb Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org>:> > On Fri, Jul 05, 2019 at 10:43:12AM +0000, Simon Tatham via llvm-dev wrote: > > But before I do that, I wanted to check whether there would be any > > objection on grounds of build dependencies. Is it acceptable to require Python > > as part of the normal build process for LLVM? > > At the moment, Python is not truely necessary for building LLVM. The > cmake build system depends on it for some parts, but that's all. I would > be very sad for that to change.llvm-build (LLVMBuild.txt) requires python. The LLVM build will abort with message(FATAL_ERROR "Unable to find Python interpreter, required for builds and testing. Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") without it. Michael
Joerg Sonnenberger via llvm-dev
2019-Jul-11 20:44 UTC
[llvm-dev] Python build dependency in LLVM and/or clang?
On Wed, Jul 10, 2019 at 11:08:22AM -0500, Michael Kruse wrote:> Am Fr., 5. Juli 2019 um 07:01 Uhr schrieb Joerg Sonnenberger via > llvm-dev <llvm-dev at lists.llvm.org>: > > > > On Fri, Jul 05, 2019 at 10:43:12AM +0000, Simon Tatham via llvm-dev wrote: > > > But before I do that, I wanted to check whether there would be any > > > objection on grounds of build dependencies. Is it acceptable to require Python > > > as part of the normal build process for LLVM? > > > > At the moment, Python is not truely necessary for building LLVM. The > > cmake build system depends on it for some parts, but that's all. I would > > be very sad for that to change. > > llvm-build (LLVMBuild.txt) requires python. The LLVM build will abort with > > message(FATAL_ERROR > "Unable to find Python interpreter, required for builds and testing. > > Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") > > without it.That's what I said. The cmake based build system needs it. LIT is optional. It is entirely feasible to have a custom build system and no Python at all. It would be quite painful to break that. Joerg
Roman Lebedev via llvm-dev
2019-Jul-11 20:51 UTC
[llvm-dev] Python build dependency in LLVM and/or clang?
I'd like to cautiously push back on this too. While python may or may not already be required to the certain extents in certain configs, requiring it for build (for one target, true) 'even more' by writing a whole upstream TableGen backed in it is just bad practice IMO. On Thu, Jul 11, 2019 at 11:44 PM Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > On Wed, Jul 10, 2019 at 11:08:22AM -0500, Michael Kruse wrote: > > Am Fr., 5. Juli 2019 um 07:01 Uhr schrieb Joerg Sonnenberger via > > llvm-dev <llvm-dev at lists.llvm.org>: > > > > > > On Fri, Jul 05, 2019 at 10:43:12AM +0000, Simon Tatham via llvm-dev wrote: > > > > But before I do that, I wanted to check whether there would be any > > > > objection on grounds of build dependencies. Is it acceptable to require Python > > > > as part of the normal build process for LLVM? > > > > > > At the moment, Python is not truely necessary for building LLVM. The > > > cmake build system depends on it for some parts, but that's all. I would > > > be very sad for that to change. > > > > llvm-build (LLVMBuild.txt) requires python. The LLVM build will abort with > > > > message(FATAL_ERROR > > "Unable to find Python interpreter, required for builds and testing. > > > > Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") > > > > without it. > > That's what I said. The cmake based build system needs it. LIT is > optional. It is entirely feasible to have a custom build system and no > Python at all. It would be quite painful to break that. > > JoergRoman.> _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Tim Northover via llvm-dev
2019-Jul-11 20:53 UTC
[llvm-dev] Python build dependency in LLVM and/or clang?
On Thu, 11 Jul 2019 at 21:44, Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org> wrote:> That's what I said. The cmake based build system needs it. LIT is > optional. It is entirely feasible to have a custom build system and no > Python at all. It would be quite painful to break that.To be explicit (and correct me if I misstate facts), NetBSD wants to build Clang with minimal dependencies because it's the system compiler. And so it completely replaces our build system with something not far removed from a hard-coded set of build steps to eliminate CMake/make/ninja (maybe you allow make?). Tests are not run (at that stage?) since they do always require Python. To be frank, I do not think we should compromise LLVM to support this system. It's just not a realistic thing to impose on an external project: NetBSD's footprint constraints are its choice, and it should bear the burden of supporting them. Personally, I support adding Python as a build dependency. Though I'd be interested in seeing responses to Mehdi's comments. Cheers. Tim.