nacl in android

93 views
Skip to first unread message

Hui Wang

unread,
Aug 30, 2017, 9:09:27 AM8/30/17
to Chromium-discuss, Chromium-dev
Hi

    when i comile chromium for android platform, i found the enable_nacl is setted true by default.  but chromium
not support nacl in android platform,

     chrome/BUILD.gn
     if (enable_nacl) {
    bundle_data("chrome_framework_plugins") {
      sources = []
      outputs = [
        "{{bundle_root_dir}}/Internet Plug-Ins/{{source_file_part}}",
      ]
      public_deps = []

      if (enable_nacl) {
        if (current_cpu == "x86") {
          sources += [ "$root_out_dir/nacl_irt_x86_32.nexe" ]
        } else if (current_cpu == "x64") {
          sources += [ "$root_out_dir/nacl_irt_x86_64.nexe" ]
        }
        public_deps += [ "//ppapi/native_client:irt" ]
      }
    }
  } else {
    group("chrome_framework_plugins") {
    }
  }
so what does this switch affect?

Brett Wilson

unread,
Aug 30, 2017, 9:42:08 AM8/30/17
to wanghui...@gmail.com, Chromium-discuss, Chromium-dev
I think the code you pasted is for desktop Mac. Chrome has never supported NaCl on mobile platforms.

Brett 

Hui Wang

unread,
Aug 30, 2017, 10:16:08 AM8/30/17
to Brett Wilson, Chromium-discuss, Chromium-dev
when i run gn args out/Default , i just set target_os="android" is_debug=false. but when  run gn args out/Default --list.  the enable_nacl is setted to true.  chrome had never supportted NaCl on mobile platforms why set enable_nacl to true. BTW, does chromium have plan to support NaCl on mobile platforms?

Brett Wilson

unread,
Aug 30, 2017, 10:46:40 AM8/30/17
to Hui Wang, Chromium-discuss, Chromium-dev
I agree it's confusing. I assume the flag is just never checked on Android. It's a historical thing rather than any indication of future plans.

Brett

Dirk Pranke

unread,
Aug 30, 2017, 3:03:28 PM8/30/17
to Hui Wang, Chromium-discuss, Chromium-dev, Brett Wilson
enable_nacl should not be set to true on Android by default:


If you're seeing that, something weird is probably going on.

-- Dirk

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CABiGVV-%3DBCes9x-YDrNoSiTzV9gveb4%3DG1jWt%2B%3DM%2BEpSKA%2Bk1g%40mail.gmail.com.

Dirk Pranke

unread,
Aug 30, 2017, 3:08:12 PM8/30/17
to Hui Wang, Chromium-discuss, Chromium-dev, Brett Wilson
Actually, I think this is a bug in GN. 

If I run `gn gen out/Default --args='target_os="android"'` as you say, and then run `gn args --list out/Default`, I do see that it's reporting that enable_nacl is true. However, if you add a print(enable_nacl, current_toolchain) to features.gni, you can see that it's actually false for the android toolchain and true for the host toolchains. `gn args --list` is just printing the wrong thing.

-- Dirk
Reply all
Reply to author
Forward
0 new messages