[LLVMdev] New Configure Option for LLVM Builds

Óscar Fuentes ofv at wanadoo.es
Mon Jun 20 13:18:29 PDT 2011


Justin Holewinski <justin.holewinski at gmail.com> writes:

[snip]

> Is the introduction of a configure-time variable in the CMake build
> scripts an acceptable addition in LLVM trunk?

Yes, but I'm just speaking just as the "official" maintainer of the
CMake build so I'm not saying that it is the best solution for your
problem.

If you end adding the configure option, please put it in the PTX target
CMakelists.txt file. Extra bonus if you document it on doc/CMake.html
(you may create a new section "Target-specific options.")

Instead of configuring a header file, try passing the option as a
`define' (add_definitions -DPTX_FOO=BAR)

> Is there any precedent for backend-specific configure options?

No, AFAIR, but I don't think it matters if it turns to be the Right
Thing for solving your problem.

> Would the autotools-based build system need to be modified to get
> something like this to work?

Sure, you need to add the option to the scripts, just like CMake, but
don't know the details. I'll look at the svn log for
autoconf/configure.ac and see what modifications required a similar
change. Then submit a patch for review. Once approved, you need to
regenerate the scripts before committing.

HTH




More information about the llvm-dev mailing list