Blame view

3rdparty/boost_1_81_0/libs/context/build/architecture.jam 2.59 KB
977ed18d   Hu Chunming   提交三方库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  # architecture.jam
  #
  # Copyright 2012 Steven Watanabe
  #
  # Distributed under the Boost Software License Version 1.0. (See
  # accompanying file LICENSE_1_0.txt or copy at
  # http://www.boost.org/LICENSE_1_0.txt)
  
  import configure ;
  import project ;
  import path ;
  import property ;
  
  local here = [ modules.binding $(__name__) ] ;
  
  project.push-current [ project.current ] ;
  project.load [ path.join [ path.make $(here:D) ] ../config ] ;
  project.pop-current ;
  
  rule deduce-address-model ( properties * )
  {
      local result = [ property.select <address-model> : $(properties) ] ;
      if $(result)
      {
          return $(result) ;
      }
      else
      {
          if [ configure.builds /boost/architecture//32 : $(properties) : 32-bit ]
          {
              return <address-model>32 ;
          }
          else if [ configure.builds /boost/architecture//64 : $(properties) : 64-bit ]
          {
              return <address-model>64 ;
          }
      }
  }
  
  rule address-model ( )
  {
      return <conditional>@architecture.deduce-address-model ;
  }
  
  rule deduce-architecture ( properties * )
  {
      local result = [ property.select <architecture> : $(properties) ] ;
      if $(result)
      {
          return $(result) ;
      }
      else
      {
          if [ configure.builds /boost/architecture//arm : $(properties) : arm ]
          {
              return <architecture>arm ;
          }
          else if [ configure.builds /boost/architecture//loongarch : $(properties) : loongarch ]
          {
              return <architecture>loongarch ;
          }
          else if [ configure.builds /boost/architecture//mips : $(properties) : mips ]
          {
              return <architecture>mips ;
          }
          else if [ configure.builds /boost/architecture//power : $(properties) : power ]
          {
              return <architecture>power ;
          }
          else if [ configure.builds /boost/architecture//riscv : $(properties) : riscv ]
          {
              return <architecture>riscv ;
          }
          else if [ configure.builds /boost/architecture//s390x : $(properties) : s390x ]
          {
              return <architecture>s390x ;
          }
          else if [ configure.builds /boost/architecture//sparc : $(properties) : sparc ]
          {
              return <architecture>sparc ;
          }
          else if [ configure.builds /boost/architecture//x86 : $(properties) : x86 ]
          {
              return <architecture>x86 ;
          }
          else if [ configure.builds /boost/architecture//combined : $(properties) : combined ]
          {
              return <architecture>combined ;
          }
      }
  }
  
  rule architecture ( )
  {
      return <conditional>@architecture.deduce-architecture ;
  }