Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[enhance] compiler, bsl: added --no-absolute-plugin needed for buildi…

…ng opx without absolute reference to opp
  • Loading branch information...
commit cadf7ec67d73a2ffd1b53885c60634c55232cf52 1 parent fb992fe
@BourgerieQuentin BourgerieQuentin authored
View
1  libbsl.mllib
@@ -25,3 +25,4 @@ libbsl/BslDirectives
libbsl/BslIncludeFormats
libbsl/BslRegisterParserState
libbsl/BslError
+libbsl/BslArgs
View
34 libbsl/bslArgs.ml
@@ -0,0 +1,34 @@
+(*
+ Copyright © 2012 MLstate
+
+ This file is part of OPA.
+
+ OPA is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License, version 3, as published by
+ the Free Software Foundation.
+
+ OPA is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with OPA. If not, see <http://www.gnu.org/licenses/>.
+*)
+
+type t = {
+ no_absolute : bool;
+}
+
+let default = {
+ no_absolute = false;
+}
+
+let x = ref default
+
+let get () = !x
+
+let options = [
+ ("--no-absolute-plugin", Base.Arg.Unit (fun () -> x := {no_absolute = true})
+ , "Plugin paths should not be considered as absolute path (package will not refers to plugin with an absolute path)")
+]
View
25 libbsl/bslArgs.mli
@@ -0,0 +1,25 @@
+(*
+ Copyright © 2012 MLstate
+
+ This file is part of OPA.
+
+ OPA is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License, version 3, as published by
+ the Free Software Foundation.
+
+ OPA is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with OPA. If not, see <http://www.gnu.org/licenses/>.
+*)
+
+type t = {
+ no_absolute : bool;
+}
+
+val get : unit -> t
+
+val options : (string * Base.Arg.spec * string) list
View
2  libbsl/bslConvention.ml
@@ -1,5 +1,5 @@
(*
- Copyright © 2011 MLstate
+ Copyright © 2012 MLstate
This file is part of OPA.
View
7 opa/pass_BslLoading.ml
@@ -393,7 +393,12 @@ let process
Hashtbl.add extralib_plugin basename extralib ;
Hashtbl.add extrapath_plugin basename extrapath ;
BslDynlink.load_bypass_plugin (BslDynlink.MarshalPlugin plugin) ;
- let inclusion = BslConvention.inclusion ~cwd:"" bypass_plugin in
+ let inclusion =
+ let bypass_plugin =
+ if (BslArgs.get ()).BslArgs.no_absolute then Filename.basename bypass_plugin
+ else bypass_plugin
+ in
+ BslConvention.inclusion ~cwd:"" bypass_plugin in
let extralib = inclusion.BslConvention.extralib in
let extrapath = inclusion.BslConvention.extrapath in
let plugin = inclusion.BslConvention.plugin in
View
1  opalib/opaEnv.ml
@@ -442,6 +442,7 @@ struct
ObjectFiles.Arg.public_options @
I18n.options @
OpaSyntax.Args.options @
+ BslArgs.options @
QmlDbGen.Args.options @
[
(* a *)
Please sign in to comment.
Something went wrong with that request. Please try again.