This patch adds OpenMP runtime to the linker command line if -fopenmp is specifed.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Needs a test, I think we should add a couple of -fopenmp=foo run lines to clang/test/Driver/aix-ld.c to verify that the correct linker options are produced for each.
Comment Actions
Addressed comments.
- added test scenarios for option fopenmp in clang/test/Driver/aix-ld.c
Comment Actions
Some minor nits about how we can shorten the test, but otherwise LGTM
clang/test/Driver/aix-ld.c | ||
---|---|---|
1027 | nit: since the output for these tests are really the same, apart from one line with the library name, we could use two prefixes, a common one and a specific one to avoid repetition: // RUN: | FileCheck --check-prefixes=CHECK-FOPENMP,CHECK-FOPENMP-OMP %s and then the CHECK block can go something like this: ... // CHECK-FOPENMP-NOT: "-lm" // CHECK-FOPENMP-OMP: "-lomp" // CHECK-FOPENMP-IOMP5: "-liomp5" // CHECK-FOPENMP-GOMP: "-lgomp // CHECK-FOPENMP: "-lc" ... |
clang/test/Driver/aix-ld.c | ||
---|---|---|
1027 | Good suggestion, thanks! |
nit: since the output for these tests are really the same, apart from one line with the library name, we could use two prefixes, a common one and a specific one to avoid repetition:
and then the CHECK block can go something like this: