Skip to content

Commit

Permalink
Merged master:116e38fd8b8 into amd-gfx:ac9866a082e
Browse files Browse the repository at this point in the history
Local branch amd-gfx ac9866a Merged master:f4d42732653 into amd-gfx:46422bde7eb
Remote branch master 116e38f lld: add basic static library search
  • Loading branch information
Sw authored and Sw committed Jun 3, 2020
2 parents ac9866a + 116e38f commit 3e53220
Show file tree
Hide file tree
Showing 41 changed files with 1,534 additions and 388 deletions.
2 changes: 2 additions & 0 deletions clang-tools-extra/clangd/tool/ClangdMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,8 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var
// Shall we allow to customize the file limit?
RenameOpts.AllowCrossFile = CrossFileRename;

Opts.AsyncPreambleBuilds = AsyncPreamble;

ClangdLSPServer LSPServer(
*TransportLayer, FSProvider, CCOpts, RenameOpts, CompileCommandsDirPath,
/*UseDirBasedCDB=*/CompileArgsFrom == FilesystemCompileArgs,
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct VersionBase {
return major == other.major && minor == other.minor;
}
bool operator>=(const VersionType &other) const {
return major >= other.major ||
return major > other.major ||
(major == other.major && minor >= other.minor);
}
};
Expand Down
20 changes: 17 additions & 3 deletions lld/MachO/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,15 @@ static Optional<std::string> findDylib(StringRef name) {
if (fs::exists(path))
return path;
}
error("library not found for -l" + name);
return None;
}

static Optional<std::string> findArchive(StringRef name) {
for (StringRef dir : config->searchPaths) {
std::string path = (dir + "/lib" + name + ".a").str();
if (fs::exists(path))
return path;
}
return None;
}

Expand Down Expand Up @@ -286,10 +294,16 @@ bool macho::link(llvm::ArrayRef<const char *> argsArr, bool canExitEarly,
case OPT_INPUT:
addFile(arg->getValue());
break;
case OPT_l:
if (Optional<std::string> path = findDylib(arg->getValue()))
case OPT_l: {
StringRef name = arg->getValue();
if (Optional<std::string> path = findDylib(name))
addFile(*path);
else if (Optional<std::string> path = findArchive(name))
addFile(*path);
else
error("library not found for -l" + name);
break;
}
case OPT_platform_version: {
handlePlatformVersion(it, end); // Can advance "it".
break;
Expand Down
30 changes: 30 additions & 0 deletions lld/test/MachO/static-link.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# REQUIRES: x86

# RUN: mkdir -p %t
#
# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %p/Inputs/libgoodbye.s -o %t/goodbye.o
# RUN: llvm-ar --format=darwin crs %t/libgoodbye.a %t/goodbye.o
#
# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %s -o %t/test.o
# RUN: lld -flavor darwinnew -o %t/test -Z -L%t -lgoodbye %t/test.o
#
# RUN: llvm-objdump --syms -d -r %t/test | FileCheck %s

# CHECK: SYMBOL TABLE:
# CHECK: {{0+}}[[ADDR:[0-9a-f]+]] g O __TEXT,__cstring _goodbye_world

# CHECK: Disassembly of section __TEXT,__text
# CHECK-LABEL: <_main>:
# CHECK: leaq {{.*}}(%rip), %rsi # [[ADDR]] <_goodbye_world>

.section __TEXT,__text
.global _main

_main:
movl $0x2000004, %eax # write()
mov $1, %rdi # stdout
leaq _goodbye_world(%rip), %rsi
mov $15, %rdx # length
syscall
mov $0, %rax
ret
4 changes: 0 additions & 4 deletions lldb/packages/Python/lldbsuite/.clang-format

This file was deleted.

2 changes: 1 addition & 1 deletion lldb/packages/Python/lldbsuite/test/lldbtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def TraceOn(self):

def trace(self, *args,**kwargs):
with recording(self, self.TraceOn()) as sbuf:
print(*args, **kwargs, file=sbuf)
print(*args, file=sbuf, **kwargs)

@classmethod
def setUpClass(cls):
Expand Down
27 changes: 0 additions & 27 deletions lldb/packages/Python/lldbsuite/test/lock.py

This file was deleted.

203 changes: 0 additions & 203 deletions lldb/packages/Python/lldbsuite/test/redo.py

This file was deleted.

13 changes: 13 additions & 0 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,19 @@ that will have been done by one of the ``@llvm.call.preallocated.*`` intrinsics.
; initialize %b
call void @bar(i32 42, %foo* preallocated(%foo) %b) ["preallocated"(token %t)]

.. _ob_gc_live

GC Live Operand Bundles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A "gc-live" operand bundle is only valid on a :ref:`gc.statepoint <gc_statepoint>`
intrinsic. The operand bundle must contain every pointer to a garbage collected
object which potentially needs to be updated by the garbage collector.

When lowered, any relocated value will be recorded in the corresponding
:ref:`stackmap entry <statepoint-stackmap-format>`. See the intrinsic description
for further details.

.. _moduleasm:

Module-Level Inline Assembly
Expand Down
Loading

0 comments on commit 3e53220

Please sign in to comment.