1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ppapi/native_client/src/trusted/plugin/pnacl_options.h"
10 #include "native_client/src/include/nacl_string.h"
14 PnaclOptions::PnaclOptions() : translate_(false), opt_level_(2) { }
16 PnaclOptions::~PnaclOptions() {
19 void PnaclOptions::set_opt_level(int32_t l) {
24 // Currently only allow 0 or 2, since that is what we test.
28 std::vector<char> PnaclOptions::GetOptCommandline() const {
29 std::vector<char> result;
32 nacl::stringstream ss;
33 ss << "-O" << opt_level_;
36 std::copy(str.begin(), str.end(), std::back_inserter(result));
37 result.push_back('\x00');