diff options
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/concat-deps.c | 5 | ||||
-rw-r--r-- | solenv/gbuild/Library.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 63 | ||||
-rw-r--r-- | solenv/gbuild/TargetLocations.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_class.mk | 1 |
5 files changed, 70 insertions, 2 deletions
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index 5b9fb4ea7dd1..b815cad29b67 100644 --- a/solenv/bin/concat-deps.c +++ b/solenv/bin/concat-deps.c @@ -1074,6 +1074,11 @@ off_t size; created_line = generate_phony_line(src_relative, "o"); rc = generate_phony_file(fn, created_line); } + else if(strncmp(src_relative, "GenCxxClrObject/", 16) == 0) + { + created_line = generate_phony_line(src_relative, "o"); + rc = generate_phony_file(fn, created_line); + } else { fprintf(stderr, "no magic for %s(%s) in %s\n", fn, src_relative, work_dir); diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index 18b62f2342bd..5166dbe6c390 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -182,6 +182,7 @@ gb_Library_add_objcxxobject = $(call gb_Library__forward_to_Linktarget,$(subst g gb_Library_add_objcxxobjects = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3)) gb_Library_add_cxxclrobject = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3)) gb_Library_add_cxxclrobjects = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3)) +gb_Library_add_generated_cxxclrobjects = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3)) gb_Library_add_asmobject = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3)) gb_Library_add_asmobjects = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3)) gb_Library_add_exception_objects = $(call gb_Library__forward_to_Linktarget,$(subst gb_Library_,,$(0)),$(1),$(2),$(3)) diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 6c7bfa09d1f1..cbc9499d6eb8 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -173,9 +173,9 @@ endef # Overview of dependencies and tasks of LinkTarget # # target task depends on -# LinkTarget linking AsmObject CObject CxxObject GenCObject GenCxxObject ObjCObject ObjCxxObject CxxClrObject +# LinkTarget linking AsmObject CObject CxxObject GenCObject GenCxxObject ObjCObject ObjCxxObject CxxClrObject GenCxxClrObject # LinkTarget/headers -# LinkTarget/dep joined dep file AsmObject/dep CObject/dep CxxObject/dep GenCObject/dep GenCxxObject/dep ObjCObject/dep ObjCxxObject/dep CxxClrObject/dep +# LinkTarget/dep joined dep file AsmObject/dep CObject/dep CxxObject/dep GenCObject/dep GenCxxObject/dep ObjCObject/dep ObjCxxObject/dep CxxClrObject/dep GenCxxClrObject/dep # | LinkTarget/headers # LinkTarget/headers all headers available # including own generated @@ -189,6 +189,8 @@ endef # ObjCObject objective c compile | LinkTarget/headers # ObjCxxObject objective c++ compile | LinkTarget/headers # CxxClrObject C++ CLR compile | LinkTarget/headers +# GenCxxClrObject C++ CLR compile from | LinkTarget/headers +# generated source # # AsmObject asm compile | LinkTarget # @@ -199,6 +201,7 @@ endef # ObjCObject/dep dependencies # ObjCxxObject/dep dependencies # CxxClrObject/dep dependencies +# GenCxxClrObject/dep dependencies # AsmObject/dep dependencies # LinkTarget/headers means gb_LinkTarget_get_headers_target etc. @@ -350,6 +353,28 @@ $(call gb_GenCxxObject_get_dep_target,%) : endif +# GenCxxClrObject class + +gb_GenCxxClrObject_get_source = $(WORKDIR)/$(1).$(gb_LinkTarget_CXX_SUFFIX_$(call gb_LinkTarget__get_workdir_linktargetname,$(2))) + +$(call gb_GenCxxClrObject_get_target,%) : $(gb_FORCE_COMPILE_ALL_TARGET) + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$(GEN_CXXCLR_SOURCE)),$(true),CLR,3) + test -f $(GEN_CXXCLR_SOURCE) || (echo "Missing generated source file $(GEN_CXXCLR_SOURCE)" && false) + $(call gb_CObject__command_pattern,$@,$(T_CXXCLRFLAGS) $(T_CXXCLRFLAGS_APPEND),$(GEN_CXXCLR_SOURCE),$(call gb_GenCxxClrObject_get_dep_target,$*),$(COMPILER_PLUGINS)) + +ifeq ($(gb_FULLDEPS),$(true)) +$(dir $(call gb_GenCxxClrObject_get_dep_target,%)).dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + +$(dir $(call gb_GenCxxClrObject_get_dep_target,%))%/.dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + +$(call gb_GenCxxClrObject_get_dep_target,%) : + $(if $(wildcard $@),touch $@) + +endif + + # YaccTarget class # XXX: This is more complicated than necessary, but we cannot just use @@ -532,6 +557,8 @@ $(WORKDIR)/Clean/LinkTarget/% : $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_dep_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_dep_target,$(object))) \ + $(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_target,$(object))) \ + $(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_dep_target,$(object))) \ $(call gb_LinkTarget_get_target,$(LINKTARGET)) \ $(call gb_LinkTarget_get_dep_target,$(LINKTARGET)) \ $(call gb_LinkTarget_get_headers_target,$(LINKTARGET)) \ @@ -557,6 +584,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_dep_target,$(object)))\ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_dep_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_dep_target,$(object))) \ + $(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_dep_target,$(object))) \ ) && \ $(call gb_Executable_get_command,concat-deps) $${RESPONSEFILE} > $(1)) && \ rm -f $${RESPONSEFILE} @@ -574,6 +602,7 @@ TEMPFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\ $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ + $(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_target,$(object))) \ $(PCHOBJS)) && \ $(if $(EXTRAOBJECTLISTS),cat $(EXTRAOBJECTLISTS) >> $${TEMPFILE} && ) \ mv $${TEMPFILE} $(1) @@ -716,6 +745,8 @@ $(call gb_LinkTarget_get_clean_target,$(1)) \ $(call gb_LinkTarget_get_target,$(1)) : GENCOBJECTS := $(call gb_LinkTarget_get_clean_target,$(1)) \ $(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS := +$(call gb_LinkTarget_get_clean_target,$(1)) \ +$(call gb_LinkTarget_get_target,$(1)) : GENCXXCLROBJECTS := $(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS := $$(gb_LinkTarget_CFLAGS) $(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS_APPEND := $(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS) @@ -765,6 +796,7 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : CXXCLROBJECTS := $(call gb_LinkTarget_get_dep_target,$(1)) : ASMOBJECTS := $(call gb_LinkTarget_get_dep_target,$(1)) : GENCOBJECTS := $(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS := +$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXCLROBJECTS := $(call gb_LinkTarget_get_dep_target,$(1)) : YACCOBJECTS := endif @@ -1225,6 +1257,28 @@ endif endef +# call gb_LinkTarget_add_generated_cxxclrobject,linktarget,sourcefile,cxxclrflags,linktargetmakefilename +define gb_LinkTarget_add_generated_cxxclrobject +$(call gb_LinkTarget_get_target,$(1)) : GENCXXCLROBJECTS += $(2) +$(call gb_LinkTarget_get_clean_target,$(1)) : GENCXXCLROBJECTS += $(2) + +$(call gb_LinkTarget_get_target,$(1)) : $(call gb_GenCxxClrObject_get_target,$(2)) +$(call gb_GenCxxClrObject_get_target,$(2)) : $(call gb_GenCxxClrObject_get_source,$(2),$(1)) +$(call gb_GenCxxClrObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1)) +$(call gb_GenCxxClrObject_get_target,$(2)) : T_CXXCLRFLAGS += $(call gb_LinkTarget__get_cxxclrflags,$(4)) $(3) +$(call gb_GenCxxClrObject_get_target,$(2)) : \ + OBJECTOWNER := $(call gb_Object__owner,$(2),$(1)) +$(call gb_GenCxxClrObject_get_target,$(2)) : GEN_CXXCLR_SOURCE := $(call gb_GenCxxClrObject_get_source,$(2),$(1)) + +ifeq ($(gb_FULLDEPS),$(true)) +$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXCLROBJECTS += $(2) +$(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_GenCxxClrObject_get_dep_target,$(2)) +$(call gb_GenCxxClrObject_get_dep_target,$(2)) :| $(dir $(call gb_GenCxxClrObject_get_dep_target,$(2))).dir +$(call gb_GenCxxClrObject_get_target,$(2)) :| $(dir $(call gb_GenCxxClrObject_get_dep_target,$(2))).dir +endif + +endef + # Add a bison grammar to the build. # call gb_LinkTarget_add_grammar,linktarget,yaccfile,linktargetmakefilename,cxxflags define gb_LinkTarget_add_grammar @@ -1355,6 +1409,11 @@ define gb_LinkTarget_add_generated_exception_objects $(foreach obj,$(2),$(call gb_LinkTarget_add_generated_exception_object,$(1),$(obj),$(4))) endef +# call gb_LinkTarget_add_generated_cxxclrobjects,linktarget,sourcefiles,cxxclrflags,linktargetmakefilename +define gb_LinkTarget_add_generated_cxxclrobjects +$(foreach obj,$(2),$(call gb_LinkTarget_add_generated_cxxclrobject,$(1),$(obj),$(3),$(4))) +endef + # call gb_LinkTarget_set_targettype,linktarget,targettype define gb_LinkTarget_set_targettype $(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE := $(2) diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk index 206a88e187ca..a8310655039a 100644 --- a/solenv/gbuild/TargetLocations.mk +++ b/solenv/gbuild/TargetLocations.mk @@ -128,6 +128,7 @@ gb_Module_get_target = $(WORKDIR)/Module/$(1) gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o gb_CxxClrObject_get_target = $(WORKDIR)/CxxClrObject/$(1).o +gb_GenCxxClrObject_get_target = $(WORKDIR)/GenCxxClrObject/$(1).o gb_Pagein_get_target = $(WORKDIR)/Pagein/pagein-$(1) gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1) gb_Package_get_target = $(WORKDIR)/Package/$(1).filelist @@ -310,6 +311,7 @@ $(eval $(call gb_Helper_make_dep_targets,\ AsmObject \ GenCObject \ GenCxxObject \ + GenCxxClrObject \ SdiTarget \ )) diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index b00741184d27..0916c2fd1fd9 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -160,6 +160,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(foreach object,$(CXXCLROBJECTS),$(call gb_CxxClrObject_get_target,$(object))) \ + $(foreach object,$(GENCXXCLROBJECTS),$(call gb_GenCxxClrObject_get_target,$(object))) \ $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),$(shell cat $(extraobjectlist))) \ $(PCHOBJS) $(NATIVERES)) && \ |