This behavior makes me guess that Bazel is building my project in a secret hermetic location, and only copying out the files it /knows/ are part of the dependency graph to the cache, and that my map file isn't getting pulled along for the ride.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CABsbf%3DEc7QAb67Z2HiJs0AxsVLQE0a0vm75tu6zEy9vXRxqVQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Hi Charles,so bazel C++ rules don't know about map files, so bazel doesn't copy them out of the sandbox. We have 2 options to move forward here: a) teach bazel about map files (we have hardcoded support for .d files for example, but only because bazel actually reads those files ) , or b) allow crosstool to specify arbitrary additional outputs (we had such feature request already).+Lukács T. Berki +Manuel Klimek Thoughts? :) I cannot seem to find the discussion about crosstool additional inputs, can you pls guide me who needed that?
On Sun, Jul 23, 2017 at 8:15 AM Austin Schuh <austin...@gmail.com> wrote:
--On Sat, Jul 22, 2017 at 2:16 PM 'Charles Nicholson' via bazel-discuss <bazel-discuss@googlegroups.com> wrote:This behavior makes me guess that Bazel is building my project in a secret hermetic location, and only copying out the files it /knows/ are part of the dependency graph to the cache, and that my map file isn't getting pulled along for the ride.That's exactly what is happening. (You can turn on sandbox debugging and go look in the sandbox folder that's normally removed afterwords to see it)When we needed a map file, we had already written our own C++ rules (so we could build a .deb with code for multiple architectures). I haven't had to solve this for the builtin C++ rules.Austin
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CABsbf%3DEc7QAb67Z2HiJs0AxsVLQE0a0vm75tu6zEy9vXRxqVQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the response.A colleague of mine suggested a custom rule that always passes "-Wl,-Wmap=" + myelf.map as a link flag and then "myelf.map" as an additional output. That would be a good place to objcopy out a binary from the elf anyway, so it seems reasonable?I haven't tried it yet, but it means that there would be 3 outputs from this rule: the elf, the bin, the map.Any red flags around that approach?Charles
On Wed, Jul 26, 2017 at 3:51 AM, Marcel Hlopko <hlo...@google.com> wrote:
Hi Charles,so bazel C++ rules don't know about map files, so bazel doesn't copy them out of the sandbox. We have 2 options to move forward here: a) teach bazel about map files (we have hardcoded support for .d files for example, but only because bazel actually reads those files ) , or b) allow crosstool to specify arbitrary additional outputs (we had such feature request already).+Lukács T. Berki +Manuel Klimek Thoughts? :) I cannot seem to find the discussion about crosstool additional inputs, can you pls guide me who needed that?
On Sun, Jul 23, 2017 at 8:15 AM Austin Schuh <austin...@gmail.com> wrote:
--On Sat, Jul 22, 2017 at 2:16 PM 'Charles Nicholson' via bazel-discuss <bazel-...@googlegroups.com> wrote:This behavior makes me guess that Bazel is building my project in a secret hermetic location, and only copying out the files it /knows/ are part of the dependency graph to the cache, and that my map file isn't getting pulled along for the ride.That's exactly what is happening. (You can turn on sandbox debugging and go look in the sandbox folder that's normally removed afterwords to see it)When we needed a map file, we had already written our own C++ rules (so we could build a .deb with code for multiple architectures). I haven't had to solve this for the builtin C++ rules.Austin
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CABsbf%3DEc7QAb67Z2HiJs0AxsVLQE0a0vm75tu6zEy9vXRxqVQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
----Marcel Hlopko | Software Engineer | hlo...@google.com |Google Germany GmbH | Erika-Mann-Str. 33 | 80636 München | Germany | Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle | Registergericht und -nummer: Hamburg, HRB 86891
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CACfYaaUYxjZB0Vh9d1M_ZLvit%2BxkJRzbdtPyvYxA0avt6gKqww%40mail.gmail.com.
if generate_map:
native.genrule(
name = name + "_map",
srcs = [elf_rule],
outs = [name + ".map"],
tools = ["@gcc//:arm-objdump"],
cmd = "$(location @gcc//:arm-objdump) -C --all-headers $< > $@",
tags = tags,
restricted_to = restricted_to,
visibility = visibility,
testonly = testonly)
filegroup_srcs.append(":%s.map" % (name,))
Hi,
Greetings to all,
I am working on GHS toolchain. Ccarm compiler generates “per object debug info file” by providing the flag -G and the extension of the file is .dbo. Debug info file for the archive is .dba. GCC toolchain generates per object debug info file with the extension of .dwo and .dwp (for archive) by providing the flag -gsplit-dwarf. Moreover, I am trying to produce .map file also. How to get these outputs (.dbo,.dba and .map)? Please guide me, is there any way to achieve this without using custom rules?