forked from OSchip/llvm-project
Revert "[Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON"
See post-commit discussion on https://reviews.llvm.org/D120305.
This change breaks the clang-ppc64le-rhel buildbot, though
there is suspicion that it's an issue with the bot. The change
also had a larger than expected impact on compile-time and
code-size.
This reverts commit 3c4ed02698
and some followup changes.
This commit is contained in:
parent
3001d4674d
commit
8dcb5e6bf5
|
@ -245,7 +245,7 @@ set(PPC_LINUX_DEFAULT_IEEELONGDOUBLE OFF CACHE BOOL
|
|||
set(CLANG_SPAWN_CC1 OFF CACHE BOOL
|
||||
"Whether clang should use a new process for the CC1 invocation")
|
||||
|
||||
option(CLANG_DEFAULT_PIE_ON_LINUX "Default to -fPIE and -pie on linux-gnu" ON)
|
||||
option(CLANG_DEFAULT_PIE_ON_LINUX "Default to -fPIE and -pie on Linux" OFF)
|
||||
|
||||
# TODO: verify the values against LangStandards.def?
|
||||
set(CLANG_DEFAULT_STD_C "" CACHE STRING
|
||||
|
|
|
@ -183,12 +183,6 @@ Internal API Changes
|
|||
Build System Changes
|
||||
--------------------
|
||||
|
||||
* CMake ``-DCLANG_DEFAULT_PIE_ON_LINUX=ON`` is now the default. This is used by
|
||||
linux-gnu systems to decide whether ``-fPIE -pie`` is the default (instead of
|
||||
``-fno-pic -no-pie``). This matches GCC installations on many Linux distros.
|
||||
Note: linux-android and linux-musl always default to ``-fPIE -pie``, ignoring
|
||||
this variable. ``-DCLANG_DEFAULT_PIE_ON_LINUX`` will be removed in the future.
|
||||
|
||||
AST Matchers
|
||||
------------
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
// REQUIRES: clang-driver, amdgpu-registered-target, default-pie-on-linux
|
||||
// REQUIRES: clang-driver, amdgpu-registered-target
|
||||
|
||||
// -fPIC and -fPIE only affects host relocation model.
|
||||
// device compilation always uses PIC.
|
||||
|
||||
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
|
||||
// RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \
|
||||
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
|
||||
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-STATIC %s
|
||||
|
||||
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
|
||||
// RUN: -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \
|
||||
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
|
||||
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-STATIC %s
|
||||
|
||||
// RUN: %clang -### -target x86_64-unknown-linux-gnu \
|
||||
// RUN: --offload-arch=gfx906 %s -nogpulib -nogpuinc \
|
||||
|
@ -32,6 +32,7 @@
|
|||
// RUN: 2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
|
||||
|
||||
// DEV-DAG: {{".*clang.*".* "-triple" "amdgcn-amd-amdhsa".* "-mrelocation-model" "pic" "-pic-level" "[1|2]".* "-mframe-pointer=all"}}
|
||||
// HOST-STATIC-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "static"}}
|
||||
// HOST-PIC-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "pic" "-pic-level" "2"}}
|
||||
// HOST-PIC-NOT: "-pic-is-pie"
|
||||
// HOST-PIE-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie"}}
|
||||
|
|
|
@ -93,6 +93,3 @@ config.suffixes = ['.c', '.cpp']
|
|||
|
||||
if config.host_os not in ['Linux']:
|
||||
config.unsupported = True
|
||||
# FIXME https://github.com/llvm/llvm-project/issues/54084
|
||||
if config.host_arch in ['ppc64', 'ppc64le']:
|
||||
config.unsupported = True
|
||||
|
|
|
@ -74,9 +74,9 @@ config.substitutions.append( ("%clang_lsan ", build_invocation(clang_lsan_cflags
|
|||
config.substitutions.append( ("%clangxx_lsan ", build_invocation(clang_lsan_cxxflags)) )
|
||||
|
||||
# LeakSanitizer tests are currently supported on
|
||||
# Android{aarch64, x86, x86_64}, x86-64 Linux, arm Linux, mips64 Linux, s390x Linux and x86_64 Darwin.
|
||||
# Android{aarch64, x86, x86_64}, x86-64 Linux, PowerPC64 Linux, arm Linux, mips64 Linux, s390x Linux and x86_64 Darwin.
|
||||
supported_android = config.android and config.target_arch in ['x86_64', 'i386', 'aarch64'] and 'android-thread-properties-api' in config.available_features
|
||||
supported_linux = (not config.android) and config.host_os == 'Linux' and config.host_arch in ['aarch64', 'x86_64', 'mips64', 'riscv64', 'arm', 'armhf', 'armv7l', 's390x']
|
||||
supported_linux = (not config.android) and config.host_os == 'Linux' and config.host_arch in ['aarch64', 'x86_64', 'ppc64', 'ppc64le', 'mips64', 'riscv64', 'arm', 'armhf', 'armv7l', 's390x']
|
||||
supported_darwin = config.host_os == 'Darwin' and config.target_arch in ['x86_64']
|
||||
supported_netbsd = config.host_os == 'NetBSD' and config.target_arch in ['x86_64', 'i386']
|
||||
if not (supported_android or supported_linux or supported_darwin or supported_netbsd):
|
||||
|
|
|
@ -81,7 +81,3 @@ if not config.parallelism_group:
|
|||
|
||||
if config.host_os == 'NetBSD':
|
||||
config.substitutions.insert(0, ('%run', config.netbsd_noaslr_prefix))
|
||||
|
||||
# FIXME https://github.com/llvm/llvm-project/issues/54084
|
||||
if config.host_arch in ['ppc64', 'ppc64le']:
|
||||
config.unsupported = True
|
||||
|
|
|
@ -2,7 +2,6 @@ from lldbsuite.test import lldbinline
|
|||
from lldbsuite.test import decorators
|
||||
|
||||
decor = [decorators.skipUnlessHasCallSiteInfo,
|
||||
decorators.skipIf(archs=['arm'],oslist=["linux"]),
|
||||
decorators.skipIf(dwarf_version=['<', '4']),
|
||||
decorators.skipIf(compiler="clang", compiler_version=['<', '11.0'])]
|
||||
lldbinline.MakeInlineTest(__file__, globals(), name="UnambiguousTailCalls_V5",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# XFAIL: target-arm && linux-gnu
|
||||
# REQUIRES: system-linux, lzma, xz
|
||||
|
||||
# We want to keep the symbol "multiplyByThree" in the .dynamic section and not
|
||||
|
|
|
@ -9,7 +9,7 @@ write_cmake_config("Config") {
|
|||
output = "$target_gen_dir/config.h"
|
||||
values = [
|
||||
"BUG_REPORT_URL=https://github.com/llvm/llvm-project/issues/",
|
||||
"CLANG_DEFAULT_PIE_ON_LINUX=1",
|
||||
"CLANG_DEFAULT_PIE_ON_LINUX=",
|
||||
"CLANG_DEFAULT_LINKER=",
|
||||
"CLANG_DEFAULT_STD_C=",
|
||||
"CLANG_DEFAULT_STD_CXX=",
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define BUG_REPORT_URL "https://github.com/llvm/llvm-project/issues/"
|
||||
|
||||
/* Default to -fPIE and -pie on Linux. */
|
||||
#define CLANG_DEFAULT_PIE_ON_LINUX 1
|
||||
#define CLANG_DEFAULT_PIE_ON_LINUX 0
|
||||
|
||||
/* Default linker to use. */
|
||||
#define CLANG_DEFAULT_LINKER ""
|
||||
|
|
Loading…
Reference in New Issue