Teach upcxx to compile C files
Our upcxx
compiler wrapper currently does not allow the user to safely compile C language source files. Instead it blindly passes them to the C++ compiler, and some C++ compilers (notably clang) rightly complain about the incorrect language source file.
This unfortunately leaves C/C++ hybrid programmers without a robust/portable solution for compiling their C files using upcxx
in a way that will be link-compatible with their UPC++ application. nobs (and upcxx-meta) have the information about the link-compatible C compiler (the one used to build GASNet and C components of libupcxx), so we should expose that to the end user through the upcxx
compiler wrapper for building their own C language files.
The recommended workaround for users of the current release is to use upcxx-meta
as follows:
$ `upcxx-meta CC` -O -c mycfile.c
$ upcxx -O myupcxx.cxx mycfile.o
Comments (3)
-
reporter -
reporter - changed status to resolved
Fix issue
#229: Teach upcxx wrapper to compile C language files→ <<cset efff989e5629>>
-
reporter Merge pull request #92 into develop
→ <<cset 21aa54250661>>
- Log in to comment
Proposed fix in pull request #92.
The caveats:
upcxx
(use separate invocations for each language)The updated usage given the enhancement: