See https://github.com/kripken/emscripten/issues/2970 , it looks like
currently we emit relative paths, with the soucemapper assuming files are
under the current dir. If we emit absolute paths, it seems to be a way to
fix that, but not sure if that is supposed to work or not in browsers, so
we might need another solution.

- Alon


On Sun, Feb 8, 2015 at 10:04 AM, Alecazam <[email protected]> wrote:

> Ugh, I still can't get source maps out of my .bc files.  My successful
> test case has .cpp and .bc files in the same directory, but that isn't a
> typical scenario for actual builds.
>
> Is there some assumption to sourcemapper.js? As far as I can tell, it
> appears to start at the cwd (sourceRoot), and look for source files from
> there.  Does the .bc file encode the original compiled src path?  Mine are
> typically ../../src/foo/file.cpp -> obj/src/fool/blarg.file.bc.   The blarg
> is from the build system in case that has any impact on source lookup.
>
> My guess is that the .bc files just contain file references (in relative
> paths), and line directives to those paths.  Then the link phase actually
> looks up and copies the lines out of the source files into the .map file.
>
> When I link the .bc files with -g4, I see the memory size go up, and the
> speed go down (no native optimizer).   Then the linked .js source has no
> @line, and no sourceMappingURL in it.  It's like it's done all of this
> work, and then thrown it all out since it can't find the .cpp/.h files.
> Any suggestions here, since Bruce and others indicated they couldn't get
> source maps to function.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to