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
2 changes: 1 addition & 1 deletion inject/javax_inject/environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CLASSES_DIR = $(BUILD_DIR)/classes
INJECT_SRC_JAR = $(JAVA_DEPS_JAR_DIR)/$(JAVAX_INJECT_SOURCE_JAR)
INJECT_JAR_FULL = $(JAVA_DEPS_JAR_DIR)/$(JAVAX_INJECT_JAR)

OBJCFLAGS := $(CC_WARNINGS) $(DEBUGFLAGS)
OBJCFLAGS := $(CC_WARNINGS) $(DEBUGFLAGS) -fobjc-weak

# J2ObjC settings
J2OBJC = $(DIST_DIR)/j2objc -classpath $(INJECT_JAR_FULL) -d $(BUILD_DIR)
Expand Down
2 changes: 1 addition & 1 deletion jre_emul/Classes/J2ObjC_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ __attribute__((always_inline)) inline id JreRetainedAutoreleasedReturnValue(id v
#if __has_feature(objc_arc_weak)
# define WEAK_ __weak
#else
# define WEAK_ __unsafe_unretained
# error j2objc requires zeroing Objective-C weak references.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our internal build hits this error which this change.

#endif

CF_EXTERN_C_BEGIN
Expand Down
4 changes: 2 additions & 2 deletions jre_emul/environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ endif

# The -fobjc flags match XCode (a link fails without them because of
# missing symbols of the form OBJC_CLASS_$_[classname]).
OBJCFLAGS += $(WARNINGS) -fno-strict-overflow \
OBJCFLAGS += $(WARNINGS) -fobjc-weak -fno-strict-overflow \
-fobjc-abi-version=2 -fobjc-legacy-dispatch $(DEBUGFLAGS) \
-I/System/Library/Frameworks/ExceptionHandling.framework/Headers \
-I/System/Library/Frameworks/Security.framework/Headers \
Expand Down Expand Up @@ -185,5 +185,5 @@ ifeq ("$(strip $(CLANG_ENABLE_OBJC_ARC))", "YES")
TRANSLATE_ARGS += -use-arc
OBJCFLAGS := $(OBJCFLAGS) -fobjc-arc -fobjc-arc-exceptions\
-Wno-arc-bridge-casts-disallowed-in-nonarc \
-Xclang -fobjc-runtime-has-weak
-Xclang
endif
4 changes: 2 additions & 2 deletions junit/environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUNNER_LIB_DIST = $(ARCH_LIB_DIR)/libjunit_runner.a

# The -fobjc flags match XCode (a link fails without them because of
# missing symbols of the form OBJC_CLASS_$_[classname]).
OBJCFLAGS := -ObjC $(CC_WARNINGS) \
OBJCFLAGS := -ObjC $(CC_WARNINGS) -fobjc-weak \
-fobjc-abi-version=2 -fobjc-legacy-dispatch $(DEBUGFLAGS) \
-I/System/Library/Frameworks/ExceptionHandling.framework/Headers

Expand All @@ -47,5 +47,5 @@ ifeq ("$(strip $(CLANG_ENABLE_OBJC_ARC))", "YES")
J2OBJC := $(J2OBJC) -use-arc
OBJCFLAGS := $(OBJCFLAGS) -fobjc-arc -fobjc-arc-exceptions\
-Wno-arc-bridge-casts-disallowed-in-nonarc \
-Xclang -fobjc-runtime-has-weak
-Xclang
endif