Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mcs/build/Makefile6
-rw-r--r--mcs/build/common/.gitignore1
-rw-r--r--mcs/build/common/sourcelink.json.in8
-rw-r--r--mcs/build/library.make5
-rwxr-xr-xmsvc/scripts/genproj.cs3
5 files changed, 22 insertions, 1 deletions
diff --git a/mcs/build/Makefile b/mcs/build/Makefile
index 0437149f652..bc7fbcceba5 100644
--- a/mcs/build/Makefile
+++ b/mcs/build/Makefile
@@ -2,7 +2,7 @@ thisdir = build
SUBDIRS =
include ../build/rules.make
-BUILT_FILES = common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs
+BUILT_FILES = common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs common/sourcelink.json
all-local install-local test-local run-test-local csproj-local run-test-ondotnet-local uninstall-local doc-update-local: $(BUILT_FILES)
@:
@@ -18,6 +18,9 @@ common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs: common/Cons
test -n '$(MONO_CORLIB_VERSION)'
sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' -e 's,@''MONO_CORLIB_VERSION@,$(MONO_CORLIB_VERSION),' $< > $@
+common/sourcelink.json: common/sourcelink.json.in $(wildcard config.make) | $(topdir)/class/lib/$(PROFILE_DIRECTORY)
+ sed -e 's,@mono_topdir@,$(shell cd $(topdir)/.. && pwd),' -e 's,@mono_commit_hash@,$(shell cd $(topdir)/.. && git rev-parse HEAD),' -e 's,@corefx_commit_hash@,$(shell cd $(topdir)/../external/corefx && git rev-parse HEAD),' -e 's,@corert_commit_hash@,$(shell cd $(topdir)/../external/corert && git rev-parse HEAD),' -e 's,@cecil_commit_hash@,$(shell cd $(topdir)/../external/cecil && git rev-parse HEAD),' $< > $@
+
PLATFORMS = macos linux win32 unix
PROFILES = \
build \
@@ -28,6 +31,7 @@ PROFILES = \
COMMON_SRCS = \
Consts.cs.in \
+ common/sourcelink.json.in \
Locale.cs \
MonoTODOAttribute.cs \
basic-profile-check.cs \
diff --git a/mcs/build/common/.gitignore b/mcs/build/common/.gitignore
index e610081c9b9..2d5bdd46dae 100644
--- a/mcs/build/common/.gitignore
+++ b/mcs/build/common/.gitignore
@@ -1 +1,2 @@
/Consts.cs
+/sourcelink.json
diff --git a/mcs/build/common/sourcelink.json.in b/mcs/build/common/sourcelink.json.in
new file mode 100644
index 00000000000..4cc1e128a6f
--- /dev/null
+++ b/mcs/build/common/sourcelink.json.in
@@ -0,0 +1,8 @@
+{
+ "documents": {
+ "@mono_topdir@/external/corefx/*": "https://raw.githubusercontent.com/mono/corefx/@corefx_commit_hash@/*",
+ "@mono_topdir@/external/corert/*": "https://raw.githubusercontent.com/mono/corert/@corert_commit_hash@/*",
+ "@mono_topdir@/external/cecil/*": "https://raw.githubusercontent.com/mono/cecil/@cecil_commit_hash@/*",
+ "@mono_topdir@/*": "https://raw.githubusercontent.com/mono/mono/@mono_commit_hash@/*"
+ }
+}
diff --git a/mcs/build/library.make b/mcs/build/library.make
index 7780ba740f4..b5c88da0b46 100644
--- a/mcs/build/library.make
+++ b/mcs/build/library.make
@@ -72,6 +72,11 @@ endif
endif
endif
+# add sourcelink information if we're building a portable PDB
+ifneq (, $(findstring debug:portable, $(PROFILE_MCS_FLAGS)))
+LIB_MCS_FLAGS += -sourcelink:$(topdir)/build/common/sourcelink.json
+endif
+
the_libdir = $(the_libdir_base)$(intermediate)
ifdef LIBRARY_USE_INTERMEDIATE_FILE
diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs
index 2e1056d0bcb..ee1518a0b5d 100755
--- a/msvc/scripts/genproj.cs
+++ b/msvc/scripts/genproj.cs
@@ -713,6 +713,9 @@ public class MsbuildGenerator {
case "/features":
return true;
+
+ case "/sourcelink":
+ return true;
}
Console.Error.WriteLine ($"// Failing with : {arg}");