r222526 - clang: do not add -pie for tsan
Rafael EspĂndola
rafael.espindola at gmail.com
Fri Nov 21 05:12:44 PST 2014
This is failing on some bots:
http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/23384/steps/check-all/logs/Clang%3A%3Afsanitize.c
On 21 November 2014 07:19, Dmitry Vyukov <dvyukov at google.com> wrote:
> Author: dvyukov
> Date: Fri Nov 21 06:19:01 2014
> New Revision: 222526
>
> URL: http://llvm.org/viewvc/llvm-project?rev=222526&view=rev
> Log:
> clang: do not add -pie for tsan
>
> Revision 220571 removes the requirement to use -pie for tsan binaries. So remove -pie from driver.
> Also s/hasZeroBaseShadow/requiresPIE/ because that is what it is used for. Msan does not have zero-based shadow, but requires pie. And in general the relation between zero-based shadow and pie is unclear.
>
> http://reviews.llvm.org/D6318
>
>
> Modified:
> cfe/trunk/include/clang/Driver/SanitizerArgs.h
> cfe/trunk/lib/Driver/SanitizerArgs.cpp
> cfe/trunk/lib/Driver/ToolChains.cpp
>
> Modified: cfe/trunk/include/clang/Driver/SanitizerArgs.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/SanitizerArgs.h?rev=222526&r1=222525&r2=222526&view=diff
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/SanitizerArgs.h (original)
> +++ cfe/trunk/include/clang/Driver/SanitizerArgs.h Fri Nov 21 06:19:01 2014
> @@ -49,7 +49,7 @@ class SanitizerArgs {
> bool needsDfsanRt() const { return Sanitizers.has(SanitizerKind::DataFlow); }
>
> bool sanitizesVptr() const { return Sanitizers.has(SanitizerKind::Vptr); }
> - bool hasZeroBaseShadow() const;
> + bool requiresPIE() const;
> bool needsUnwindTables() const;
> bool linkCXXRuntimes() const { return LinkCXXRuntimes; }
> void addArgs(const llvm::opt::ArgList &Args,
>
> Modified: cfe/trunk/lib/Driver/SanitizerArgs.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/SanitizerArgs.cpp?rev=222526&r1=222525&r2=222526&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/SanitizerArgs.cpp (original)
> +++ cfe/trunk/lib/Driver/SanitizerArgs.cpp Fri Nov 21 06:19:01 2014
> @@ -42,7 +42,7 @@ ID = ALIAS, ID##Group = 1 << SO_##ID##Gr
> #include "clang/Basic/Sanitizers.def"
> NeedsUbsanRt = Undefined | Integer,
> NotAllowedWithTrap = Vptr,
> - HasZeroBaseShadow = Thread | Memory | DataFlow,
> + RequiresPIE = Memory | DataFlow,
> NeedsUnwindTables = Address | Thread | Memory | DataFlow
> };
> }
> @@ -140,8 +140,8 @@ bool SanitizerArgs::needsUbsanRt() const
> return !UbsanTrapOnError && hasOneOf(Sanitizers, NeedsUbsanRt);
> }
>
> -bool SanitizerArgs::hasZeroBaseShadow() const {
> - return AsanZeroBaseShadow || hasOneOf(Sanitizers, HasZeroBaseShadow);
> +bool SanitizerArgs::requiresPIE() const {
> + return AsanZeroBaseShadow || hasOneOf(Sanitizers, RequiresPIE);
> }
>
> bool SanitizerArgs::needsUnwindTables() const {
>
> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=222526&r1=222525&r2=222526&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
> +++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Nov 21 06:19:01 2014
> @@ -2507,7 +2507,7 @@ bool FreeBSD::HasNativeLLVMSupport() con
> }
>
> bool FreeBSD::isPIEDefault() const {
> - return getSanitizerArgs().hasZeroBaseShadow();
> + return getSanitizerArgs().requiresPIE();
> }
>
> /// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly.
> @@ -3383,7 +3383,7 @@ void Linux::AddClangCXXStdlibIncludeArgs
> }
>
> bool Linux::isPIEDefault() const {
> - return getSanitizerArgs().hasZeroBaseShadow();
> + return getSanitizerArgs().requiresPIE();
> }
>
> /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly.
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list