 
   defp compile_manifest(manifest, entries, sources, stale, dest, opts) do
     Mix.Utils.compiling_n(length(stale), :ex)
-    Mix.Project.ensure_structure()
+
+    config = Mix.Project.config()
+    Mix.Project.ensure_structure(config)
     true = Code.prepend_path(dest)
 
+    opts = Keyword.merge(config[:elixirc_options] || [], opts)
     set_compiler_opts(opts)
     cwd = File.cwd!
 

    # Starts a server responsible for keeping track which files
    # were compiled and the dependencies between them.
    {:ok, pid} = Agent.start_link(fn -> {entries, sources} end)

    try do
      long_compilation_threshold = Keyword.get(opts, :long_compilation_threshold, 5)
      _ = Kernel.ParallelCompiler.files :lists.usort(stale),
            [each_module: &each_module(pid, dest, cwd, &1, &2, &3),
             each_long_compilation: &each_long_compilation(&1, long_compilation_threshold),
             long_compilation_threshold: long_compilation_threshold,

  end

  defp set_compiler_opts(opts) do
    opts
    |> Keyword.take(Code.available_compiler_options)
    |> Code.compiler_options()
  end

  defp each_module(pid, dest, cwd, source, module, binary) do
