Self-adaptive systems have recently attracted attention because of their ability to cope with changing environments, including system intrusions or faults. Such software must modify itself to better fit its environment, and one of the approaches by which we expect this capability to be achieved is the introduction of multiple control loops to assess the situation and to determine whether a change in behaviors or configurations is necessary and how to implement the change. Development of such systems with multiple control loops complicates the task of identifying components, and could be greatly aided by appropriate tool support. In this paper, we propose an architectural compiler for self-adaptive systems, which generates architectural configurations from the goal-oriented requirements descriptions. We also present a framework for generating such configurations with this compiler and a pattern in the requirements description. We evaluate the framework experimentally and show that it helps to generate suitable configurations that have high performance, and that the compiler scales well to large input models.