Thread

  1. Disable LLVM bitcode generation with pgxs.mk framework.

    Xing Guo <higuoxing@gmail.com> — 2024-03-12T13:38:23Z

    Hi hackers,
    
    When the PostgreSQL server is configured with --with-llvm, the pgxs.mk
    framework will generate LLVM bitcode for extensions automatically.
    Sometimes, I don't want to generate bitcode for some extensions. I can
    turn off this feature by specifying with_llvm=0 in the make command.
    
    ```
    make with_llvm=0
    ```
    
    Would it be possible to add a new switch in the pgxs.mk framework to
    allow users to disable this feature? E.g., the Makefile looks like:
    
    ```
    WITH_LLVM=no
    PG_CONFIG = pg_config
    PGXS := $(shell $(PG_CONFIG) --pgxs)
    ```
    
    Best Regards,
    Xing
    
    
    
    
  2. Re: Disable LLVM bitcode generation with pgxs.mk framework.

    Daniel Gustafsson <daniel@yesql.se> — 2024-03-12T14:40:19Z

    > On 12 Mar 2024, at 14:38, Xing Guo <higuoxing@gmail.com> wrote:
    
    > Would it be possible to add a new switch in the pgxs.mk framework to
    > allow users to disable this feature?
    
    Something like that doesn't seem unreasonable I think.
    
    --
    Daniel Gustafsson
    
    
    
    
    
  3. Re: Disable LLVM bitcode generation with pgxs.mk framework.

    Xing Guo <higuoxing@gmail.com> — 2024-03-13T00:01:31Z

    > On Tue, Mar 12, 2024 at 10:40 PM Daniel Gustafsson <daniel@yesql.se> wrote:
    >
    > > On 12 Mar 2024, at 14:38, Xing Guo <higuoxing@gmail.com> wrote:
    >
    > > Would it be possible to add a new switch in the pgxs.mk framework to
    > > allow users to disable this feature?
    >
    > Something like that doesn't seem unreasonable I think.
    
    Thanks.
    
    I added a new option NO_LLVM_BITCODE to pgxs. I'm not sure if the name
    is appropriate.
    
    > --
    > Daniel Gustafsson
    >
    
  4. Re: Disable LLVM bitcode generation with pgxs.mk framework.

    Peter Eisentraut <peter@eisentraut.org> — 2024-03-13T06:45:26Z

    On 12.03.24 14:38, Xing Guo wrote:
    > When the PostgreSQL server is configured with --with-llvm, the pgxs.mk
    > framework will generate LLVM bitcode for extensions automatically.
    > Sometimes, I don't want to generate bitcode for some extensions. I can
    > turn off this feature by specifying with_llvm=0 in the make command.
    > 
    > ```
    > make with_llvm=0
    > ```
    > 
    > Would it be possible to add a new switch in the pgxs.mk framework to
    > allow users to disable this feature? E.g., the Makefile looks like:
    > 
    > ```
    > WITH_LLVM=no
    > PG_CONFIG = pg_config
    > PGXS := $(shell $(PG_CONFIG) --pgxs)
    > ```
    
    Can't you just put the very same with_llvm=0 into the makefile?
    
    
    
    
    
  5. Re: Disable LLVM bitcode generation with pgxs.mk framework.

    Xing Guo <higuoxing@gmail.com> — 2024-03-13T07:18:33Z

    > On Wed, Mar 13, 2024 at 2:45 PM Peter Eisentraut <peter@eisentraut.org> wrote:
    >
    > On 12.03.24 14:38, Xing Guo wrote:
    > > When the PostgreSQL server is configured with --with-llvm, the pgxs.mk
    > > framework will generate LLVM bitcode for extensions automatically.
    > > Sometimes, I don't want to generate bitcode for some extensions. I can
    > > turn off this feature by specifying with_llvm=0 in the make command.
    > >
    > > ```
    > > make with_llvm=0
    > > ```
    > >
    > > Would it be possible to add a new switch in the pgxs.mk framework to
    > > allow users to disable this feature? E.g., the Makefile looks like:
    > >
    > > ```
    > > WITH_LLVM=no
    > > PG_CONFIG = pg_config
    > > PGXS := $(shell $(PG_CONFIG) --pgxs)
    > > ```
    >
    > Can't you just put the very same with_llvm=0 into the makefile?
    
    Ah, you're right. I can set it by overriding that variable.
    
    ```
    override with_llvm=no
    ```