Skip to content
  1. Dec 03, 2012
  2. Dec 01, 2012
  3. Nov 29, 2012
  4. Nov 28, 2012
  5. Nov 27, 2012
  6. Nov 25, 2012
  7. Nov 23, 2012
  8. Nov 22, 2012
    • Chandler Carruth's avatar
      Fix the '-fuse-init-array' option to actually be an option. · 05fb585a
      Chandler Carruth authored
      Previously, this flag to CC1 was never exposed at the clang driver
      layer, and if you happened to enable it (by being on Android or GCC 4.7
      platform), you couldn't *disable* it, because there was no 'no' variant.
      The whole thing was confusingly implemented.
      
      Now, the target-specific flag processing gets the driver arg list, and
      we use standard hasFlag with a default based on the GCC version and/or
      Android platform. The user can still pass the 'no-' variant to forcibly
      disable the flag, or pass the positive variant to clang itself to enable
      the flag.
      
      The test has also been substantially cleaned up and extended to cover
      these use cases.
      
      llvm-svn: 168473
      05fb585a
  9. Nov 21, 2012
  10. Nov 19, 2012
    • Logan Chien's avatar
      Add -ldl for non-static libgcc in Android. · 3d3373ce
      Logan Chien authored
      According to Android ABI, we have to link with
      libdl.so, if we are linking with non-static libgcc.
      
      Besides, this also fixes MIPS link error of
      undefined references to `_Unwind_Find_FDE' and
      `dl_iterate_phdr'.
      
      llvm-svn: 168310
      3d3373ce
    • Logan Chien's avatar
      Enable -fuse-init-array for Android X86/MIPS. · 1d8cc65a
      Logan Chien authored
      The dynamic linker of Android does not support .ctors/.dtors.
      We should emit .init_array and .fini_array regardless the
      gcc version.
      
      NOTE: This patch does not affect the ARM backend, because
      it is required to generate .init_array and .fini_array
      for program targeting ARM AAPCS and AEABI.
      
      llvm-svn: 168309
      1d8cc65a
    • Chandler Carruth's avatar
      Completely re-work how the Clang driver interprets PIC and PIE options. · 76a943be
      Chandler Carruth authored
      There were numerous issues here that were all entangled, and so I've
      tried to do a general simplification of the logic.
      1) The logic was mimicing actual GCC bugs, rather than "features". These
         have been fixed in trunk GCC, and this fixes Clang as well. Notably,
         the logic was always intended to be last-match-wins like any other
         flag.
      2) The logic for handling '-mdynamic-no-pic' was preposterously unclear.
         It also allowed the use of this flag on non-Darwin platforms where it
         has no actual meaning. Now this option is handled directly based on
         tests of how llvm-gcc behaves, and it is only supported on Darwin.
      3) The APIs for the Driver's ToolChains had the implementation ugliness
         of dynamic-no-pic leaking through them. They also had the
         implementation details of the LLVM relocation model flag names
         leaking through.
      4) The actual results of passing these flags was incorrect on Darwin in
         many cases. For example, Darwin *always* uses PIC level 2 if it uses
         in PIC level, and Darwin *always* uses PIC on 64-bit regardless of
         the flags specified, including -fPIE. Darwin never compiles in PIE
         mode, but it can *link* in PIE mode.
      5) Also, PIC was not always being enabled even when PIE was. This isn't
         a supported mode at all and may have caused some fallout in builds
         with complex PIC and PIE interactions.
      
      The result is (I hope) cleaner and clearer for readers. I've also left
      comments and tests about some of the truly strage behavior that is
      observed on Darwin platforms. We have no real testing of Windows
      platforms and PIC, but I don't have the tools handy to figure that out.
      Hopefully others can beef up our testing here.
      
      Unfortunately, I can't test this for every platform. =/ If folks have
      dependencies on these flags that aren't covered by tests, they may
      break. I've audited and ensured that all the changes in behavior of the
      existing tests are intentional and good. In particular I've tried to
      make sure the Darwin behavior (which is more suprising than the Linux
      behavior) also matches that of 'gcc' on my mac.
      
      llvm-svn: 168297
      76a943be
  11. Nov 16, 2012
  12. Nov 15, 2012
  13. Nov 13, 2012
    • Benjamin Kramer's avatar
      This patch makes the behavior of clang consistent with the behavior of gcc 4.6... · 76db2907
      Benjamin Kramer authored
      This patch makes the behavior of clang consistent with the behavior of gcc 4.6 in cases where both -fPIC and -fPIE is used.
      
      - Separately check if -fPIE was specified in the command line and define both __PIC__ and __PIE__ when -fPIE is used. We need to check this separately because -fPIE will infer -fPIC even if its not explicitly used.
      - Fixed existing tests.
      - Added new tests for cases where both -fPIC and -fPIE is used.
      
      Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
      Fixes: PR13221
      Review: http://llvm-reviews.chandlerc.com/D94
      llvm-svn: 167846
      76db2907
  14. Nov 09, 2012
  15. Nov 08, 2012
  16. Nov 06, 2012
  17. Nov 05, 2012
    • Richard Smith's avatar
      Add -fsanitize=<sanitizers> argument to driver and frontend, and add · 52be619c
      Richard Smith authored
      -fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the
      various UBSan checks to be enabled and disabled separately. Right now, the
      different modes can't be combined, but the intention is that combining UBSan
      and the other sanitizers will be permitted in the near future.
      
      Currently, the UBSan checks will all be enabled if any of them is; that will be
      fixed by the next patch.
      
      llvm-svn: 167411
      52be619c
  18. Nov 02, 2012
  19. Oct 31, 2012
Loading