Skip to content

Commit 84d68fa

Browse files
Merge branch 'main' into threadsetClauseClaim
2 parents 0d26b59 + 8c2b4aa commit 84d68fa

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,11 @@ void tools::addFortranRuntimeLibs(const ToolChain &TC, const ArgList &Args,
13401340
CmdArgs.push_back("-lFortranRuntime");
13411341
CmdArgs.push_back("-lFortranDecimal");
13421342
addArchSpecificRPath(TC, Args, CmdArgs);
1343+
1344+
// needs libexecinfo for backtrace functions
1345+
if (TC.getTriple().isOSFreeBSD() || TC.getTriple().isOSNetBSD() ||
1346+
TC.getTriple().isOSOpenBSD() || TC.getTriple().isOSDragonFly())
1347+
CmdArgs.push_back("-lexecinfo");
13431348
}
13441349

13451350
// libomp needs libatomic for atomic operations if using libgcc

flang/test/Driver/linker-flags.f90

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
! RUN: %flang -### --target=ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,UNIX-F128%f128-lib
66
! RUN: %flang -### --target=aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,DARWIN,DARWIN-F128%f128-lib
77
! RUN: %flang -### --target=sparc-sun-solaris2.11 %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,SOLARIS-F128%f128-lib
8-
! RUN: %flang -### --target=x86_64-unknown-freebsd %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,UNIX-F128%f128-lib
9-
! RUN: %flang -### --target=x86_64-unknown-netbsd %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,UNIX-F128%f128-lib
10-
! RUN: %flang -### --target=x86_64-unknown-openbsd %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,UNIX-F128%f128-lib
11-
! RUN: %flang -### --target=x86_64-unknown-dragonfly %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,UNIX-F128%f128-lib
8+
! RUN: %flang -### --target=x86_64-unknown-freebsd %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,BSD,BSD-F128%f128-lib
9+
! RUN: %flang -### --target=x86_64-unknown-netbsd %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,BSD,BSD-F128%f128-lib
10+
! RUN: %flang -### --target=x86_64-unknown-openbsd %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,BSD,BSD-F128%f128-lib
11+
! RUN: %flang -### --target=x86_64-unknown-dragonfly %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,BSD,BSD-F128%f128-lib
1212
! RUN: %flang -### --target=x86_64-unknown-haiku %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,HAIKU,HAIKU-F128%f128-lib
1313
! RUN: %flang -### --target=x86_64-windows-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,MINGW,MINGW-F128%f128-lib
1414
! RUN: %flang -### -rtlib=compiler-rt --target=aarch64-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,UNIX,COMPILER-RT
@@ -36,6 +36,14 @@
3636
! UNIX-SAME: "-lFortranRuntime" "-lFortranDecimal" "-lm"
3737
! COMPILER-RT: "{{.*}}{{\\|/}}libclang_rt.builtins.a"
3838

39+
! BSD-LABEL: "{{.*}}ld{{(\.exe)?}}"
40+
! BSD-SAME: "[[object_file]]"
41+
! BSD-F128NONE-NOT: FortranFloat128Math
42+
! BSD-F128LIBQUADMATH-SAME: "-lFortranFloat128Math" "--as-needed" "-lquadmath" "--no-as-needed"
43+
! BSD-SAME: -lFortranRuntime
44+
! BSD-SAME: -lFortranDecimal
45+
! BSD-SAME: -lexecinfo
46+
3947
! DARWIN-LABEL: "{{.*}}ld{{(\.exe)?}}"
4048
! DARWIN-SAME: "[[object_file]]"
4149
! DARWIN-F128NONE-NOT: FortranFloat128Math

mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@ def LLVMPointerType : LLVMType<"LLVMPointer", "ptr", [
291291
def LLVMFixedVectorType : LLVMType<"LLVMFixedVector", "vec"> {
292292
let summary = "LLVM fixed vector type";
293293
let description = [{
294-
LLVM dialect scalable vector type, represents a sequence of elements of
295-
unknown length that is known to be divisible by some constant. These
296-
elements can be processed as one in SIMD context.
294+
LLVM dialect vector type that supports all element types that are supported
295+
in LLVM vectors but that are not supported by the builtin MLIR vector type.
296+
E.g., LLVMFixedVectorType supports LLVM pointers as element type.
297297
}];
298298

299299
let typeName = "llvm.fixed_vec";

0 commit comments

Comments
 (0)