[Chapel Merge] Link libdevice when compiling for GPU

Branch: refs/heads/main
Revision: 64207ec
Author: e-kayrakli
Link: Unavailable
Log Message:

Merge pull request #20054 from e-kayrakli/gpu-trig

Link libdevice when compiling for GPU

This PR links the libdevice bitcode library with the GPU module before generating PTX.

It follows the suggested steps outlined here: User Guide for NVPTX Back-end — LLVM 15.0.0git documentation

Resolves https://github.com/Cray/chapel-private/issues/3214
Resolves Linker errors with Random while using the GPU Locale Model · Issue #19891 · chapel-lang/chapel · GitHub

[Reviewed by @mppf]

Test: