Commit 8f38f29
[Driver] Remove the "-lompstub" in the driver
In some workloads, users get "-lompstub" by running "flang -v" and link
it explicitly, which may cause failure when compiling programs with
OpenMP (flang -fopenmp test.f90 -lompstub).
There is no runtime call in ompstub.c generated when "-fopenmp" is not
added to compile the program. When "-fopenmp" is added to compile the
program, the runtime in llvm/openmp(libomp.so) will be used. If users
use some runtime library routines such as "omp_get_thread_num" and
compiles it without the option "-fopenmp", both gfortran and ifort
report errors of "undefined reference to ...". After remove "-lompstub"
in the driver, classic-flang reports the error, too. So, it's safe to
remove the "-lompstub" in the driver.1 parent 6254c4f commit 8f38f29
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
1354 | | - | |
1355 | | - | |
1356 | 1354 | | |
1357 | 1355 | | |
1358 | 1356 | | |
| |||
0 commit comments