docs: function _monkeyPatchv8FlagsCc(compiler, options, complete) {
    var mainPath = path.join(compiler.dir, 'deps/v8/src', 'flags.cc');
  
    fs.readFile(
      mainPath,
      {
        encoding: 'utf8',
      },
      function(err, contents) {
        if (err) {
          return _log('error', 'failed to read', mainPath);
        }
  
        // Super simple injection here. Perhaps make it an array at somepoint?
        var injection =
          '\
  const char* nexevargs = "{{args}}";\n\
  int nexevargslen = strlen(nexevargs);\n\
  SetFlagsFromString(nexevargs, nexevargslen);\n\
  ';
  
        var injectionSplit = injection.split('\n');
        var injectionLength = injectionSplit.length;
        var contentsSplit = contents.split('\n');
        var contentsLength = contentsSplit.length;
        var lastInjectionLine = injectionSplit[injectionLength - 2];
        var lineToInjectAfter = contentsSplit.indexOf('  ComputeFlagListHash();');
        var haveWeInjectedBefore = contentsSplit.indexOf(lastInjectionLine);
  
        var lineInjectDifference = contentsLength - lineToInjectAfter;
  
        // support for 0.12.x
        if (lineToInjectAfter === -1) {
          _log('warn', 'Using an expiramental support patch for 0.12.x');
          lineToInjectAfter = contentsSplit.indexOf(
            '#undef FLAG_MODE_DEFINE_IMPLICATIONS',
          );
        }
  
        // support for 0.10.x
        if (lineToInjectAfter === -1) {
          _log('warn', '0.12.x patch failed. Trying 0.10.0 patch');
          lineToInjectAfter =
            contentsSplit.indexOf('#define FLAG_MODE_DEFINE_IMPLICATIONS') + 1;
        }
  
        // this is debug, comment out.
        // _log('v8 injection is', injectionLength, 'newlines long');
        // _log('v8 flags source is', contentsLength, 'newlines long');
  
        // console.log(finalContents)
  
        var finalContents, dontCombine;
  
        if (lineToInjectAfter !== -1 && haveWeInjectedBefore === -1) {
          _log('injecting v8/flags.cc');
  
          // super debug
          // _log('v8 injection determined by', lastInjectionLine);
          // _log('v8 inject after line', lineToInjectAfter);
          // _log('v8 inject needs to shift', lineInjectDifference, 'amount of lines by', injectionLength);
  
          // compute out the amount of space we'll need in this.
          var startShiftLine = contentsLength - 1; // minus one to make up for 0 arg line.
          var endShiftLine = lineToInjectAfter;
          var injectRoom = injectionLength - 1;
  
          injectionSplit[0] = injectionSplit[0].replace(
            '{{args}}',
            options.jsFlags,
          );
  
          for (var i = startShiftLine; i !== endShiftLine; i--) {
            contentsSplit[i + injectRoom] = contentsSplit[i];
            contentsSplit[i] = '';
          }
  
          var injectionPos = 0;
          for (var i = 0; i !== injectionLength - 1; i++) {
            contentsSplit[lineToInjectAfter + 1 + injectionPos] =
              injectionSplit[injectionPos];
            injectionPos++;
          }
        } else if (lineToInjectAfter !== -1 && haveWeInjectedBefore !== -1) {
          _log('re-injecting v8 args');
  
          dontCombine = true;
          finalContents = contentsSplit.join('\n');
          finalContents = finalContents.replace(
            /const char\* nexevargs = "[A-Z\-\_]*";/gi,
            'const char* nexevargs = "' + options.jsFlags + '";',
          );
        } else {
          _log(
            'error',
            'failed to find a suitable injection point for v8 args.',
            'File a bug report with the node version and log.',
          );
  
          _log(
            'lineToInjectAfter=' + lineToInjectAfter,
            'haveWeInjectedBefore=' + haveWeInjectedBefore,
          );
          return process.exit(1);
        }
  
        if (!dontCombine) {
          finalContents = contentsSplit.join('\n');
        }
  
        // write the file contents
        fs.writeFile(
          mainPath,
          finalContents,
          {
            encoding: 'utf8',
          },
          function(err) {
            if (err) {
              _log('error', 'failed to write to', mainPath);
              return process.exit(1);
            }
  
            return complete();
          },
        );
      },
    );
  }