[Chapel Merge] Small fixes for UGNI builds with bundled LLVM

Branch: refs/heads/main
Revision: 081fc337cf8790c15a9d9444fa8c0a077aaf0b6a
Author: e-kayrakli
Link: Small fixes for UGNI builds with bundled LLVM by e-kayrakli · Pull Request #24889 · chapel-lang/chapel · GitHub
Log Message:
Small fixes for UGNI builds with bundled LLVM (#24889)

This PR has two minor fixes for building the ugni layer with bundled
LLVM.

  1. On flat locale model, we get strict prototype errors because of a
    missing void in a function with 0 formals

  2. On gpu locale model with nvidia, we use -D__STRICT_ANSI__ while
    building the runtime. comm-ugni.c has some non-compliant code, so this
    PR undefines that if it is defined.

Resolves a bug reported by @ninivert on
gitter.

[Reviewed by @jabraham17]

Test:

  • gpu/native/jacobi/jacobi on ugni
  • flat "hello" on ugni

Compare: Comparing c5bc1fa172f934156c96624ed51fcfa751d1ed88...aeb1c4cde39a9bf3680368c46e674f554110c562 · chapel-lang/chapel · GitHub

Diff:
M runtime/src/comm/ugni/comm-ugni.c
https://github.com/chapel-lang/chapel/pull/24889.diff