Bug 1684110 - Define UNICODE on some directories. r=glandium

so that people do not accidentally use 'A'-functions.

Differential Revision: https://phabricator.services.mozilla.com/D100420
This commit is contained in:
Masatoshi Kimura 2021-01-13 22:49:59 +00:00
Родитель d40c24714c
Коммит 03d7defdfa
5 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -146,6 +146,14 @@ rust_cc_env_name := $(subst -,_,$(RUST_TARGET))
export CC_$(rust_cc_env_name)=$(filter-out $(CC_BASE_FLAGS),$(CC))
export CXX_$(rust_cc_env_name)=$(filter-out $(CXX_BASE_FLAGS),$(CXX))
export AR_$(rust_cc_env_name)=$(AR)
ifeq (WINNT,$(HOST_OS_ARCH))
HOST_CC_BASE_FLAGS += -DUNICODE
HOST_CXX_BASE_FLAGS += -DUNICODE
CC_BASE_FLAGS += -DUNICODE
CXX_BASE_FLAGS += -DUNICODE
endif
ifeq (,$(NATIVE_SANITIZERS)$(MOZ_CODE_COVERAGE))
# -DMOZILLA_CONFIG_H is added to prevent mozilla-config.h from injecting anything
# in C/C++ compiles from rust. That's not needed in the other branch because the

Просмотреть файл

@ -122,3 +122,6 @@ DEFINES['DEBUG'] = False
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
DEFINES['HAVE_MMAP'] = 1
DEFINES['HAVE_SYS_MMAN_H'] = 1
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
DEFINES['UNICODE'] = True

Просмотреть файл

@ -35,6 +35,7 @@ USE_LIBS += [
]
if CONFIG['OS_ARCH'] == 'WINNT':
DEFINES['UNICODE'] = True
# On windows, the WASAPI backend needs the resampler we have in
# /media/libspeex_resampler, so we can't get away with just linking cubeb's
# .o

Просмотреть файл

@ -72,6 +72,7 @@ if CONFIG['OS_TARGET'] == 'WINNT':
'cubeb_wasapi.cpp',
'cubeb_winmm.c',
]
DEFINES['UNICODE'] = True
DEFINES['USE_WINMM'] = True
DEFINES['USE_WASAPI'] = True
OS_LIBS += [

Просмотреть файл

@ -101,6 +101,7 @@ if CONFIG["ENABLE_TESTS"]:
LOCAL_INCLUDES += [
"/security/sandbox/chromium",
]
DEFINES["UNICODE"] = True
DIRS += ["benchmark", "mozilla"]