Re: Enhance Makefiles to rebuild objects on map file changes

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Enhance Makefiles to rebuild objects on map file changes
Date: 2025-10-09 03:46:07
Message-ID: 6C025667-FB34-46E0-ADA1-56893224343F@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Aug 20, 2025, at 11:44, John Naylor <johncnaylorls(at)gmail(dot)com> wrote:
>
> On Tue, Aug 19, 2025 at 10:43 PM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>>
>> Also, I suspect you should do something about Meson, but I don't know
>> what that would look like.
>
> It seems to work already on Meson:
>
> $ <build>
> $ touch src/backend/utils/mb/Unicode/win874_to_utf8.map
> $ <build>
> building for debug
> ninja: Entering directory `build-debug'
> [2/2] Linking target src/backend/utils/mb/conversion_procs/utf8_and_win.so
>
>

I just tried meson build, it seems to only rebuild the corresponding libs without rebuilding Postgres binaries:

```
chaol(at)ChaodeMacBook-Air build % touch ../src/backend/utils/mb/Unicode/euc_cn_to_utf8.map
chaol(at)ChaodeMacBook-Air build % ninja -v
[1/2] cc -Isrc/backend/utils/mb/conversion_procs/utf8_and_euc_cn.dylib.p -Isrc/include -I../src/include -I/opt/homebrew/opt/lz4/include -I/opt/homebrew/Cellar/openssl(at)3/3.6.0/include -I/opt/homebrew/opt/zstd/include -fdiagnostics-color=always -Wall -Winvalid-pch -O0 -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.5.sdk -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wmissing-prototypes -Wpointer-arith -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -Wdeclaration-after-statement -Wmissing-variable-declarations -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-format-truncation -Wno-cast-function-type-strict -fvisibility=hidden -MD -MQ src/backend/utils/mb/conversion_procs/utf8_and_euc_cn.dylib.p/utf8_and_euc_cn_utf8_and_euc_cn.c.o -MF src/backend/utils/mb/conversion_procs/utf8_and_euc_cn.dylib.p/utf8_and_euc_cn_utf8_and_euc_cn.c.o.d -o src/backend/utils/mb/conversion_procs/utf8_and_euc_cn.dylib.p/utf8_and_euc_cn_utf8_and_euc_cn.c.o -c ../src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c
[2/2] cc -o src/backend/utils/mb/conversion_procs/utf8_and_euc_cn.dylib src/backend/utils/mb/conversion_procs/utf8_and_euc_cn.dylib.p/utf8_and_euc_cn_utf8_and_euc_cn.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,dynamic_lookup -bundle -Wl,-undefined,dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.5.sdk -Wl,-no_warn_duplicate_libraries -Wl,-rpath,/opt/homebrew/opt/lz4/lib -Wl,-rpath,/opt/homebrew/Cellar/openssl(at)3/3.6.0/lib -Wl,-rpath,/opt/homebrew/opt/zstd/lib -fvisibility=hidden -bundle_loader /Users/chaol/Documents/code/postgresql/build/src/backend/postgres -lldap -lxml2 /opt/homebrew/opt/lz4/lib/liblz4.dylib -lpam /opt/homebrew/Cellar/openssl(at)3/3.6.0/lib/libssl.dylib /opt/homebrew/Cellar/openssl(at)3/3.6.0/lib/libcrypto.dylib -lz /opt/homebrew/opt/zstd/lib/libzstd.dylib -lm
chaol(at)ChaodeMacBook-Air build %
```

Is that expected? I think we need Postgres executables to be rebuilt then we can run tests.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-10-09 03:47:31 Re: [PATCH] Add tests for Bitmapset
Previous Message David Rowley 2025-10-09 03:35:55 Re: [PATCH] Add tests for Bitmapset