Re: Disabling IPC protocol with build flags?

2018-12-13 Thread Nathan Froyd
We have PREPROCESSED_IPDL_SOURCES in moz.build, which should at least
let you preprocess IPDL files before they get compiled.  There are no
uses in the tree, but there are tests, so ideally you should not run
into *too* many issues.

-Nathan
On Thu, Dec 13, 2018 at 11:45 AM  wrote:
>
>TL;DR: Is there a way to make a "manages" declaration conditional, for 
> protocols that depend on types that might not be defined for certain 
> build-flags?
>
>
>I ask because I am working on a protocol that fulfills webrtc's networking 
> needs (PMediaTransport), but webrtc can be disabled as a whole with the 
> --disable-webrtc build flag. PMediaTransport uses many types that aren't 
> defined when webrtc is disabled. I have tried the following approaches so far:
>
> 1. Export a mostly-empty dummy version of PMediaTransport instead of the real 
> one when webrtc is disabled. This gets me an "error: |manager| declaration in 
> protocol `PMediaTransport' does not match any |manages| declaration in 
> protocol `PSocketProcessBridge'", even after a clobber. If I remove the 
> "real" PMediaTransport from the tree, this approach works. It seems that ipdl 
> files are processed in-tree (at least partially) instead of in exports.
>
> 2. Make sure the types PMediaTransport depends on are always defined. This 
> ends up pulling in a ton more webrtc-only code that these types depend on, 
> which is not ideal.
>
> The next thing for me to try is to typedef all of these undefined types to 
> int or similar when webrtc is disabled, but I was wondering if there was a 
> way to make a "manages" conditional on build-flags?
>
> Best regards,
> Byron Campen
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Disabling IPC protocol with build flags?

2018-12-13 Thread Tom Ritter
This would also be relevant for Tor; as they would like to disable
direct UDP and TCP IPC mechanisms:
https://trac.torproject.org/projects/tor/ticket/28148

-tom

On Thu, Dec 13, 2018 at 4:45 PM  wrote:
>
>TL;DR: Is there a way to make a "manages" declaration conditional, for 
> protocols that depend on types that might not be defined for certain 
> build-flags?
>
>
>I ask because I am working on a protocol that fulfills webrtc's networking 
> needs (PMediaTransport), but webrtc can be disabled as a whole with the 
> --disable-webrtc build flag. PMediaTransport uses many types that aren't 
> defined when webrtc is disabled. I have tried the following approaches so far:
>
> 1. Export a mostly-empty dummy version of PMediaTransport instead of the real 
> one when webrtc is disabled. This gets me an "error: |manager| declaration in 
> protocol `PMediaTransport' does not match any |manages| declaration in 
> protocol `PSocketProcessBridge'", even after a clobber. If I remove the 
> "real" PMediaTransport from the tree, this approach works. It seems that ipdl 
> files are processed in-tree (at least partially) instead of in exports.
>
> 2. Make sure the types PMediaTransport depends on are always defined. This 
> ends up pulling in a ton more webrtc-only code that these types depend on, 
> which is not ideal.
>
> The next thing for me to try is to typedef all of these undefined types to 
> int or similar when webrtc is disabled, but I was wondering if there was a 
> way to make a "manages" conditional on build-flags?
>
> Best regards,
> Byron Campen
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Disabling IPC protocol with build flags?

2018-12-13 Thread docfaraday
   TL;DR: Is there a way to make a "manages" declaration conditional, for 
protocols that depend on types that might not be defined for certain 
build-flags?


   I ask because I am working on a protocol that fulfills webrtc's networking 
needs (PMediaTransport), but webrtc can be disabled as a whole with the 
--disable-webrtc build flag. PMediaTransport uses many types that aren't 
defined when webrtc is disabled. I have tried the following approaches so far:

1. Export a mostly-empty dummy version of PMediaTransport instead of the real 
one when webrtc is disabled. This gets me an "error: |manager| declaration in 
protocol `PMediaTransport' does not match any |manages| declaration in protocol 
`PSocketProcessBridge'", even after a clobber. If I remove the "real" 
PMediaTransport from the tree, this approach works. It seems that ipdl files 
are processed in-tree (at least partially) instead of in exports.

2. Make sure the types PMediaTransport depends on are always defined. This ends 
up pulling in a ton more webrtc-only code that these types depend on, which is 
not ideal.

The next thing for me to try is to typedef all of these undefined types to int 
or similar when webrtc is disabled, but I was wondering if there was a way to 
make a "manages" conditional on build-flags?

Best regards,
Byron Campen
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform