Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lldb/packages/Python/lldbsuite/test/make/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -180,21 +180,27 @@ else
# amd64, x86_64, x64 -> 64
ifeq "$(ARCH)" "amd64"
override ARCH := $(subst amd64,64,$(ARCH))
IS_X86 := 1
endif
ifeq "$(ARCH)" "x86_64"
override ARCH := $(subst x86_64,64,$(ARCH))
IS_X86 := 1
endif
ifeq "$(ARCH)" "x64"
override ARCH := $(subst x64,64,$(ARCH))
IS_X86 := 1
endif
ifeq "$(ARCH)" "x86"
override ARCH := $(subst x86,32,$(ARCH))
IS_X86 := 1
endif
ifeq "$(ARCH)" "i386"
override ARCH := $(subst i386,32,$(ARCH))
IS_X86 := 1
endif
ifeq "$(ARCH)" "i686"
override ARCH := $(subst i686,32,$(ARCH))
IS_X86 := 1
endif
ifeq "$(ARCH)" "powerpc"
override ARCH := $(subst powerpc,32,$(ARCH))
Expand Down Expand Up @@ -320,6 +326,15 @@ ifeq "$(MAKE_GMODULES)" "YES"
CXXFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
endif

# Our files use x86 AT&T assembly throughout.
# Enable it explicitly so any local Clang preference for Intel syntax gets overriden.
ifeq ($(CC_TYPE), clang)
ifeq ($(IS_X86), 1)
CFLAGS += -mllvm -x86-asm-syntax=att
CXXFLAGS += -mllvm -x86-asm-syntax=att
endif
endif

CFLAGS += $(CFLAGS_EXTRAS)
CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS)
# Copy common options to the linker flags (dwarf, arch. & etc).
Expand Down
5 changes: 5 additions & 0 deletions lldb/test/Shell/helper/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ def use_support_substitutions(config):
# The clang module cache is used for building inferiors.
host_flags += ["-fmodules-cache-path={}".format(config.clang_module_cache)]

# Our files use x86 AT&T assembly throughout.
# Enable it explicitly so any local Clang preference for Intel syntax gets overriden.
if "x86-registered-target" in config.available_features:
host_flags += ["-mllvm", "-x86-asm-syntax=att"]

if config.cmake_sysroot:
host_flags += ["--sysroot={}".format(config.cmake_sysroot)]

Expand Down
Loading