1. Mar 21, 2024
    • Keith Smiley's avatar
      [bazel] Add support for --incompatible_disallow_empty_glob · 604e9f5b
      Keith Smiley authored
      This bazel flag, that should be flipped in an upcoming release
      https://github.com/bazelbuild/bazel/pull/15327, fails if globs have no
      matches. This helps find libraries where you are accidentally not
      including files because of typos. This change removes the various globs
      that were not matching anything, and uncovered some targets that were
      doing nothing because their source files were deleted. There are a few
      cases where globs were intentionally optional in the case of loops that
      expanded to different potential options, so those now use
      `allow_empty = True`. This allows downstream consumers to also flip this
      flags for their own builds, where previously this would fail in LLVM
      instead.
      
      The downside to this change is that if files are added in these
      relatively standard locations, manual work will have to be done to add
      this patterns back. If folks prefer we could instead add
      `allow_empty = True` to every glob.
      604e9f5b
    • Thurston Dang's avatar
      [memprof] Move allocator base to avoid conflict with high-entropy ASLR (#85834) · 1b5b4eeb
      Thurston Dang authored
      memprof often fails when ASLR entropy is too high ('sudo sysctl
      vm.mmap_rnd_bits=32; ninja check-memprof'), which is the default setting
      for newer versions of Ubuntu
      (https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/commit/?h=hwe-6.5-next--2024.03.04-1--auto&id=6b522637c6a7dabd8530026ae933fb5ff17e877f).
      This patch fixes the issue by moving the allocator base, analogously to
      ASan (https://reviews.llvm.org/D148280).
      
      Explanation from the ASan patch: when CONFIG_ARCH_MMAP_RND_BITS == 32,
      it will frequently conflict with memprof's allocator, because the PIE
      program segment base address of 0x555555555554 plus an ASLR shift of up
      to ((2**32) * 4K == 0x100000000000) will sometimes exceed memprof's
      hardcoded base address of 0x600000000000. We fix this by simply moving
      the allocator base to 0x500000000000, which is below the PIE program
      segment base address. This is cleaner than trying to move it to another
      location that is sandwiched between the PIE program and library
      segments, because if either of those grow too large, it will collide
      with the allocator region.
      
      Note that we will never need to change this base address again (unless
      we want to increase the size of the allocator), because ASLR cannot be
      set above 32-bits for x86-64 Linux (the PIE program segment and library
      segments would collide with each other; see also ARCH_MMAP_RND_BITS_MAX
      in https://github.com/torvalds/linux/blob/master/arch/x86/Kconfig).
      1b5b4eeb
    • Will Hawkins's avatar
      [DwarfGenerator] Calculate relative offset according to Dwarf Version (#84847) · 12028cb1
      Will Hawkins authored
      
      
      The relative offset for a CU in Dwarf v5 (and later) is different than
      the relative offset for a CU in Dwarf v4 (and before).
      
      Signed-off-by: default avatarWill Hawkins <hawkinsw@obs.cr>
      12028cb1
    • Martin Storsjö's avatar
      Revert "[libcxx] [modules] Fix relative paths with absolute LIBCXX_INSTALL_MODULES_DIR (#85756)" · 40793703
      Martin Storsjö authored
      This reverts commit 272d1b44,
      and the follow-up fix in d209d134.
      
      Even after the follow-up fix, building with an empty
      CMAKE_INSTALL_PREFIX errors out with errors like this:
      
          CMake Error at /b/s/w/ir/x/w/llvm-llvm-project/libcxx/modules/CMakeLists.txt:215 (file):
            file RELATIVE_PATH must be passed a full path to the directory:
            lib/x86_64-pc-windows-msvc
      40793703
    • Stephen Tozer's avatar
      [RemoveDIs][NFC] Rename DPMarker->DbgMarker (#85931) · 75dfa58e
      Stephen Tozer authored
      Another trivial rename patch, the last big one for now, which renamed
      DPMarkers to DbgMarkers. This required the field `DbgMarker` in
      `Instruction` to be renamed to `DebugMarker` to avoid a clash, but
      otherwise was a simple string substitution of `s/DPMarker/DbgMarker` and
      a manual renaming of `DPM` to `DM` in the few places where that acronym
      was used for debug markers.
      75dfa58e
  2. Mar 20, 2024