[Driver] Allow -gsplit-dwarf on ELF OSes other than Linux and Fuchsia
authorFangrui Song <maskray@google.com>
Thu, 28 Mar 2019 08:24:00 +0000 (08:24 +0000)
committerFangrui Song <maskray@google.com>
Thu, 28 Mar 2019 08:24:00 +0000 (08:24 +0000)
commitee957e045f526ce45d24b0f081f277262c3da43d
tree384ced5c309e22d9d30d38e67f02952190962171
parentf896785cb72a1bc991e81386aa0ccc6c338b75e0
[Driver] Allow -gsplit-dwarf on ELF OSes other than Linux and Fuchsia

In gcc, -gsplit-dwarf is handled in gcc/gcc.c as a spec
(ASM_FINAL_SPEC): objcopy --extract-dwo + objcopy --strip-dwo. In
gcc/opts.c, -gsplit_dwarf has the same semantic of a -g. Except for the
availability of the external command 'objcopy', nothing precludes the
feature working on other ELF OSes. llvm doesn't use objcopy, so it doesn't
have to exclude other OSes.

llvm-svn: 357150
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/split-debug.c