[clang] [Clang][z/OS] Add CSECT option and pragma (PR #234368)
Ulrich Weigand via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 23 01:36:56 PDT 2026
uweigand wrote:
> > > Add -mcsect[=]/-mno-csect and #pragma csect(code|static, "name") for z/OS. Clang emits the CSECT names as zos_csect_code/zos_csect_static module flags; backend support will follow in a separate patch.
> >
> >
> > What's the actual difference between `-mcsect` (no qualifier) and `-mno-csect`? I see that with `-mno-csect` you do not provide the module flags, but the back-end will still choose a section name, and that seems to be the same as when using `-mcsect` without qualifier. Am I missing something here?
>
> They can differ when the output and source file names differ. With `-mno-csect`, the backend uses the source file name. With `-mcsect`, the output file name is used. `main.c -o bar` gives `main#C` with `-mno-csect` and `bar#C` with `-mcsect`.
I see, thanks. Might be good to have that explained in the documentation.
https://github.com/llvm/llvm-project/pull/234368
More information about the cfe-commits
mailing list