Skip to content

Commit

Permalink
Backout bcd72aabb661, 1ed1c6212f4c, and 8d6f286139ef (bug 1025998) fo…
Browse files Browse the repository at this point in the history
…r xpcshell bustage leading to this CLOSED TREE
  • Loading branch information
froydnj committed Jun 25, 2014
1 parent 0e95fc7 commit 6c211cf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 672 deletions.
27 changes: 12 additions & 15 deletions python/mozbuild/mozbuild/action/convert_def_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@ def preprocess_file(pp, deffile):
# directives are hidden behind ";", ";+", and ";-"
#
# We don't care about rule 1, as that mainly serves to eliminate LIBRARY
# and EXPORTS lines. Our symbol extraction routines handle DATA, so we
# don't need to bother with rule 2. We don't want to enforce rule 3, as
# we know how to eliminate comments. ';+' also tends to hide Unix
# linker-script specific things, which we don't want to deal with here.
# Rule 5 is also unnecessary; later comment-aware processing will deal
# with that.
# and EXPORTS lines. We don't want to enforce rule 3, as we know how to
# eliminate comments. ';+' also tends to hide Unix linker-script specific
# things, which we don't want to deal with here. Rule 5 is also unnecessary;
# later comment-aware processing will deal with that.
#
# We need to handle rule 4, since ';;' often hides things marked with DATA.
# We do need to handle rule 2, since our symbol extraction doesn't want to
# see DATA keywords. We also need to handle rule 4, since ';;' often hides
# things marked with DATA.
def nss_preprocess_file(deffile):
with open(deffile, 'r') as input:
for line in input:
yield line.replace(';;', '')
# Rule 2, and then rule 4.
yield line.replace(' DATA ', '').replace(';;', '')

COMMENT = re.compile(';.*')

Expand All @@ -66,15 +67,11 @@ def extract_symbols(lines):
else:
fields = line.split()

# We don't support aliases, and we only support the DATA keyword on
# We don't support aliases or keywords (ordinals, PRIVATE, etc.) for
# symbols. But since aliases can also be specified as 'SYM=ALIAS'
# with no whitespace, we need extra checks on the original symbol.
if '=' in fields[0]:
raise BaseException, 'aliases are not supported (%s)' % line
if len(fields) == 1:
pass
elif len(fields) != 2 or fields[1] != 'DATA':
raise BaseException, 'aliases and keywords other than DATA are not supported (%s)' % line
if len(fields) != 1 or '=' in fields[0]:
raise 'aliases and keywords are not supported'

symbols.add(fields[0])

Expand Down
19 changes: 15 additions & 4 deletions security/build/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,22 @@ EXTRA_DSO_LDOPTS += $(DEPTH)/db/sqlite3/src/$(LIB_PREFIX)mozsqlite3.$(LIB_SUFFIX
# Add all static libraries for nss, smime, ssl and nssutil
SHARED_LIBRARY_LIBS = $(addprefix ../,$(NSS_STATIC_LIBS))

nss_def_file := $(srcdir)/nss.def
nss_def_files := $(addprefix $(srcdir)/../, \
nss/lib/util/nssutil.def \
nss/lib/nss/nss.def \
nss/lib/ssl/ssl.def \
nss/lib/smime/smime.def \
)

# Try to guard against NSS renaming things out from underneath us.
ifneq ($(nss_def_files),$(wildcard $(nss_def_files)))
$(error Need to update list of NSS def files)
endif

ifeq (WINNT,$(OS_TARGET))
# Create a .def file based on the various .def files for nss, smime, ssl and
# nssutil.
nss3.def: $(nss_def_file) $(DEPTH)/db/sqlite3/src/sqlite-processed.def
nss3.def: $(nss_def_files) $(DEPTH)/db/sqlite3/src/sqlite-processed.def
echo LIBRARY nss3$(DLL_SUFFIX) > $@.tmp
echo EXPORTS >> $@.tmp
grep -v -h -e ^LIBRARY -e ^EXPORTS -e ^\; $^ >> $@.tmp
Expand All @@ -348,10 +358,11 @@ ifdef GCC_USE_GNU_LD
sqlite_def_file := $(topsrcdir)/db/sqlite3/src/sqlite.def
nspr_def_file := $(srcdir)/nspr-dummy.def

nss3.def: $(nss_def_file) $(sqlite_def_file) $(nspr_def_file)
nss3.def: $(nss_def_files) $(sqlite_def_file) $(nspr_def_file)
@$(call py_action,convert_def_file, \
$(DEFINES) $(ACDEFINES) $(XULPPFLAGS) -o $@ \
$(nss_def_file) $(sqlite_def_file) $(nspr_def_file))
$(addprefix --nss-file=,$(nss_def_files)) \
$(sqlite_def_file) $(nspr_def_file))

GARBAGE += \
nss3.def \
Expand Down
Loading

0 comments on commit 6c211cf

Please sign in to comment.