dimakuv commented on PR #71:
URL: https://github.com/apache/apr/pull/71#issuecomment-4152940104

   @notroj Looking at the current CI workflow ([Linux 
example](https://github.com/apache/apr/blob/trunk/.github/workflows/linux.yml)),
 I see that there are two knobs that the apr project uses:
   1. "config", e.g. `config: --enable-maintainer-mode`
   2. "notest-cflags", e.g. `notest-cflags: -Werror`
   
   I cannot use the first knob, because there's no way to specify arbitrary 
compilation flags as inputs to the configure script (at least I don't see a way 
after inspecting `./configure --help`).
   
   I also cannot use the second knob (`notest-cflags`) because my PR fixes 
**the test**, and this knob applies only to non-test compilation units.
   
   So the only option I see is to introduce a new variable `cflags` (similar to 
`notest-cflags`). This variable will be empty/undefined in all current 
workflows, and will be defined only in my new workflow. Smth like this:
   ```diff
   diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
   @@ -87,10 +87,14 @@ jobs:
                notest-cflags: -Werror
                config: --enable-maintainer-mode --with-berkeley-db 
--with-dbm=db5
                config-output: APU_HAVE_DB
   +          - name: Auto-var-init
   +            os: ubuntu-latest  # requires gcc 12 or higher
   +            cflags: -ftrivial-auto-var-init=zero
          fail-fast: false
   
        runs-on: ${{ matrix.os }}
        env:
   +      CFLAGS: ${{ matrix.cflags }}
          NOTEST_CFLAGS: ${{ matrix.notest-cflags }}
        name: ${{ matrix.name }}
        steps:
   
   ```
   
   Is the above what you would recommend to add?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to